Re: Convenient shortcut to push delete current branch?

2015-10-01 Thread Jacob Keller
On Thu, Oct 1, 2015 at 9:43 AM, Robert Dailey wrote: > For convenient pushing of current branch, git supports this syntax: > > $ git push origin HEAD > > This will push your current branch up. However, is there such a > shortcut for *deleting* the branch? The only goal

[PATCH] notes: allow merging from arbitrary references

2015-10-01 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Create a new expansion function, expand_loose_notes_ref which will expand any ref using get_sha1, but falls back to expand_notes_ref if this fails. The contents of the strbuf will be either the hex string of the sha1, or the expanded not

Re: [PATCH] notes: allow merging from arbitrary references

2015-10-01 Thread Jacob Keller
On Thu, Oct 1, 2015 at 3:39 PM, Jacob Keller <jacob.e.kel...@intel.com> wrote: > From: Jacob Keller <jacob.kel...@gmail.com> > > Create a new expansion function, expand_loose_notes_ref which will > expand any ref using get_sha1, but falls back to expand_notes_ref if &g

Re: Why not git reset --hard ?

2015-09-29 Thread Jacob Keller
On Mon, Sep 28, 2015 at 2:19 PM, Junio C Hamano wrote: > I agree with you if we limit the scope to "reset --hard" that does > not mention any commit on the command line (or says "HEAD"). > > However, for things like: > > $ git reset --hard HEAD^ Makefile > $ git reset

Re: Why not git reset --hard ?

2015-09-28 Thread Jacob Keller
On Mon, Sep 28, 2015 at 1:42 PM, Junio C Hamano wrote: > "George Spelvin" writes: >> I understand that "git reset --soft" makes no sense with a path, but >> why not --hard? > > I do not think there is anything fundamentally wrong for wishing for > "reset

Re: [PATCH] submodule-parallel-fetch: make some file local symbols static

2015-09-25 Thread Jacob Keller
On Fri, Sep 25, 2015 at 8:15 AM, Ramsay Jones wrote: > [Note these issues were spotted by sparse and static-check.pl] Any chance you got a link to docs about static-check.pl? I've never heard of this... Regards, Jake -- To unsubscribe from this list: send the line

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-22 Thread Jacob Keller
On Tue, Sep 22, 2015 at 11:37 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> The other issue here is that expand_notes_ref is called on the --ref >> argument waaay before the current code even decides if the op

Re: [PATCHv3 03/13] xread_nonblock: add functionality to read from fds nonblockingly

2015-09-22 Thread Jacob Keller
On Mon, Sep 21, 2015 at 3:39 PM, Stefan Beller wrote: Maybe change the title to "without blocking" instead of "nonblockingly"? Regards, Jake -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCHv3 03/13] xread_nonblock: add functionality to read from fds nonblockingly

2015-09-22 Thread Jacob Keller
On Mon, Sep 21, 2015 at 5:10 PM, Junio C Hamano wrote: >> This wrapper just restarts on EINTR, but not on EAGAIN like xread >> does. This gives less guarantees on the actual reading rather than >> on returning fast. > > The last sentence is a bit hard to parse, by the way. >

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-22 Thread Jacob Keller
On Wed, Sep 16, 2015 at 3:34 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> The documentation for --refs says that it will treat unqualified ref

Re: [PATCHv3 02/13] xread: poll on non blocking fds

2015-09-22 Thread Jacob Keller
On Mon, Sep 21, 2015 at 9:55 PM, Torsten Bögershausen wrote: > But in any case I suggest to xread() as it is, and not to change the > functionality > behind the back of the users. > > I don't think this patch actually changes behavior as it stands now. I think Junio's suggestion

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-22 Thread Jacob Keller
On Tue, Sep 22, 2015 at 7:17 AM, Junio C Hamano wrote: > Calls expand_notes_ref() made on a command line argument that > specifies the source (which I think is similar to what the other > recent topic calls "read-only") should be made to calls to a more > lenient version (and

[PATCH] notes: document behavior of --ref and --notes DWIMery

2015-09-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> The --notes and --ref parameter for selecting which notes ref to operate on are based off of expand_notes_ref functionality. The documentation mentioned that an unqualified ref argument would be taken as under `refs/notes/`. However, thi

[PATCH v2] notes: correct documentation of DWIMery for notes references

2015-09-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> expand_notes_ref is used by --ref from git-notes(1) and --notes from the git log to find the full refname of a notes reference. Previously the documentation of these options was not clear about what sorts of expansions would be performe

Re: [PATCHv3 04/13] strbuf: add strbuf_read_once to read without blocking

2015-09-22 Thread Jacob Keller
On Mon, Sep 21, 2015 at 5:17 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> The new call will read a fd into a strbuf once. The underlying call > > "read from a fd" > >> xread_nonblock is meant to execute non blockingly if the fd is set to >>

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-22 Thread Jacob Keller
On Tue, Sep 22, 2015 at 7:17 AM, Junio C Hamano wrote: > The current code before your patch limits the allowed pair of notes > trees by insisting that both appear as the tips of refs somewhere in > refs/notes/*. For allowing to merge from outside refs/notes/, you > need to

Re: [BUG?] HEAD detached at HEAD

2015-09-18 Thread Jacob Keller
On Fri, Sep 18, 2015 at 9:59 AM, Matthieu Moy wrote: > I'm getting it even if there's a tag and/or a branch pointing to the > same commit. > > Any idea what's going on? > Any chance you accidentally made a branch or tag named HEAD? Regards, Jake -- To unsubscribe

Re: Bug after removing a local branch and restore the remote branch during a rebase

2015-09-17 Thread Jacob Keller
Hi, On Thu, Sep 17, 2015 at 3:12 AM, Robert Strobl wrote: > It might be an unusual workflow, however it leads to a bug: > > git checkout feature_branch > git rebase master > Ok so you are performing the rebase... > # a couple of conflicts occur, which I don’t want

Re: [PATCH 00/10] fetch submodules in parallel and a preview on parallel "submodule update"

2015-09-17 Thread Jacob Keller
On Wed, Sep 16, 2015 at 6:38 PM, Stefan Beller wrote: > It took me a while to get the idea how to realize parallelism with the > parallel run command structure now as opposed to the thread pool I proposed > earlier, but I think it will be straightforward from here. > Yea at

Re: "Medium" log format: change proposal for author != committer

2015-09-16 Thread Jacob Keller
On Tue, Sep 15, 2015 at 6:52 PM, Junio C Hamano wrote: > > * Enhance the "--pretty=format:" thing so that the current set of >hardcoded --pretty=medium,short,... formats and your modified >"medium" can be expressed as a custom format string. > > * Introduce a

[PATCH 2/2] notes: allow non-writable actions on refs outside of refs/notes

2015-09-16 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Allow non-destructive notes actions which do not require write permission to be performed on refs outside of refs/notes/. The primary advantage of this is to allow fetching remote refs to such location as "refs/remote-notes//foo" and

[PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-16 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> The documentation for --refs says that it will treat unqualified refs as under refs/notes. Current behavior is to prefix refs/notes to all strings that do not start with refs/notes or notes/, resulting in performing actions on refs such as "

[PATCH 0/2] notes: allow read only notes actions on refs outside of refs/notes

2015-09-16 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> The primary purpose of this series is to allow fetching remote notes into a namespace such as "refs/remote-notes//foo". Currently, git-notes refuses to operate on refs outside of refs/notes/* including merging from them, listing

Re: [PATCH 0/2] notes: allow read only notes actions on refs outside of refs/notes

2015-09-16 Thread Jacob Keller
On Wed, Sep 16, 2015 at 3:36 PM, Mike Hommey <m...@glandium.org> wrote: > On Wed, Sep 16, 2015 at 03:06:32PM -0700, Jacob Keller wrote: >> This topic depends on mh/notes-allow-reading-treeish and actually >> expands what this topic allowed before. Previously, treeishes such

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-16 Thread Jacob Keller
On Wed, Sep 16, 2015 at 3:34 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> The documentation for --refs says that it will treat unqualified ref

Re: Git Deployment using existing multiple environments

2015-09-14 Thread Jacob Keller
On Sun, Sep 13, 2015 at 10:55 PM, Sukhwinder Singh wrote: > Thank you for the reply. Let's say I do setup three different repositories > then how can we move work from one repository to the other. For example, from > Test Environment to UAT. If there are any

Re: [PATCH] doc: show usage of branch description

2015-09-12 Thread Jacob Keller
what the branch is > - for, to be used by various other commands (e.g. `request-pull`). > + for, to be used by various other commands (e.g. `format-patch` > + and `request-pull`). Multi-line explanations may be used. > Are these the only locations? Just want to make sure while we're updating

storing cover letter of a patch series?

2015-09-10 Thread Jacob Keller
Hey, does anyone know of any tricks for storing a cover letter for a patch series inside of git somehow? I'd guess the only obvious way currently is to store it at the top of the series as an empty commit.. but this doesn't get emailed *as* the cover letter... Is there some other way? Would

Re: storing cover letter of a patch series?

2015-09-10 Thread Jacob Keller
On Thu, Sep 10, 2015 at 10:41 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> Is there some other way? Would others be interested in such a feature? > > Not me. > >> I get very annoyed when I've written a

Re: storing cover letter of a patch series?

2015-09-10 Thread Jacob Keller
On Thu, Sep 10, 2015 at 11:02 AM, Martin Fick wrote: > On Thursday, September 10, 2015 10:41:54 AM Junio C Hamano > wrote: >> >> I think "should" is too strong here. Yes, you could >> implement that way. It is debatable if it is better, or >> a flat file kept in a

Re: storing cover letter of a patch series?

2015-09-10 Thread Jacob Keller
On Thu, Sep 10, 2015 at 11:44 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> I hadn't thought of separating the cover letter from git-send-email. >> That would be suitable for me. > > Yeah, I said this n

Re: storing cover letter of a patch series?

2015-09-10 Thread Jacob Keller
On Thu, Sep 10, 2015 at 1:09 PM, Philip Oakley <philipoak...@iee.org> wrote: > From: "Jacob Keller" <jacob.kel...@gmail.com> >> >> On Thu, Sep 10, 2015 at 11:44 AM, Junio C Hamano <gits...@pobox.com> >> wrote: >>> >>> Jaco

Re: storing cover letter of a patch series?

2015-09-10 Thread Jacob Keller
On Thu, Sep 10, 2015 at 11:58 AM, Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > Hi Jake, > > On 2015-09-10 18:28, Jacob Keller wrote: > >> does anyone know of any tricks for storing a cover letter for a patch >> series inside of git somehow? > > I

Re: [PATCHv1 0/2] git-p4: work on a detached head

2015-09-09 Thread Jacob Keller
On Wed, Sep 9, 2015 at 5:03 AM, Lars Schneider wrote: > I wanted to play with the patch and apply it to my source but the process is > really complicated for me. I wonder if you can give me a few recommendations > how to work efficiently with email patches. I don’t

Re: [PATCHv1 0/2] git-p4: work on a detached head

2015-09-09 Thread Jacob Keller
On Wed, Sep 9, 2015 at 6:57 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: > On Wed, Sep 9, 2015 at 5:03 AM, Lars Schneider <larsxschnei...@gmail.com> > wrote: >> I wanted to play with the patch and apply it to my source but the process is >> really complicated fo

Re: Conditionally define vars to improve portability

2015-09-08 Thread Jacob Keller
On Tue, Sep 8, 2015 at 11:57 AM, Junio C Hamano wrote: > Common things like CC are not so problematic, but more problematic > are various Git build customization in our Makefile that can be left > behind from a previous build. It is easier for users to forget, as > a

Re: [PATCH] tag: support mixing --sort= and -n

2015-09-06 Thread Jacob Keller
On Sat, Sep 5, 2015 at 9:38 PM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> On Sun, Sep 6, 2015 at 3:55 AM, Jacob Keller <jacob.kel...@gmail.com> wrote: >>> On Sat, Sep 5, 2015 at 10:52 AM, Rudy Matela <

Re: [PATCH] tag: support mixing --sort= and -n

2015-09-05 Thread Jacob Keller
On Sat, Sep 5, 2015 at 10:52 AM, Rudy Matela wrote: > > Allow -n and --sort=version:refname to be used together > instead of failing with: > > fatal: --sort and -n are incompatible > > Signed-off-by: Rudy Matela Nice! I've been wondering about this one

Re: git grep broken in Fedora 21 update?

2015-09-03 Thread Jacob Keller
On Thu, Sep 3, 2015 at 5:04 PM, Rustad, Mark D wrote: > I just found a case where grep and git grep yield different results. Inside > the ixgbe directory of the Linux kernel I did: > > $ grep enter_lplu *.[ch] > > And got the following: > > ixgbe_main.c: if

Re: determine name of tag used for checkout when multiple tags exist?

2015-09-03 Thread Jacob Keller
On Thu, Sep 3, 2015 at 7:53 PM, Jesse Hopkins wrote: > > It seems to me that when checking out to a tag, Git does not record the > *name* of the tag anywhere, but rather sets HEAD to the de-referenced > commit SHA-1. As far as I can tell, it is not possible to recover the

Re: Git's inconsistent command line options

2015-08-26 Thread Jacob Keller
On Wed, Aug 26, 2015 at 10:56 AM, Junio C Hamano gits...@pobox.com wrote: But notice that I said if you really want to. I personally think it is a road to madness. Agreed. I don't believe in command line API here. I think we'd need a better solution. My gut says: Live with the warts on old

Re: Git's inconsistent command line options

2015-08-26 Thread Jacob Keller
On Tue, Aug 25, 2015 at 11:28 PM, Andreas Schwab sch...@linux-m68k.org wrote: Jacob Keller jacob.kel...@gmail.com writes: if you really mean to create a tag named create, use git tag -- create master In all other uses of -- refs must be put on the *left* side. Andreas. Oops

Re: [PATCH v2 2/2] trailer: support multiline title

2015-08-26 Thread Jacob Keller
On Tue, Aug 25, 2015 at 11:07 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Christian Couder christian.cou...@gmail.com writes: Unfortunately this does not work well when a commit is created with a line break in the title, using for example the following command: git commit -m 'place

[PATCH] tag: teach -n to override tag.sort configuration

2015-08-26 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com git tag -n will always fail if tag.sort is set to a sort other than the default refname setting. Teach git tag to have -n override the configuration setting when -n is used, instead of failing with fatal: --sort and -n incompatible since the user

Re: Git's inconsistent command line options

2015-08-26 Thread Jacob Keller
On Wed, Aug 26, 2015 at 3:52 PM, Philip Oakley philipoak...@iee.org wrote: From: Jacob Keller jacob.kel...@gmail.com On Wed, Aug 26, 2015 at 10:56 AM, Junio C Hamano gits...@pobox.com wrote: But notice that I said if you really want to. I personally think it is a road to madness. Agreed

Re: Git's inconsistent command line options

2015-08-26 Thread Jacob Keller
On Wed, Aug 26, 2015 at 4:02 PM, Jacob Keller jacob.kel...@gmail.com wrote: On Wed, Aug 26, 2015 at 3:52 PM, Philip Oakley philipoak...@iee.org wrote: From: Jacob Keller jacob.kel...@gmail.com On Wed, Aug 26, 2015 at 10:56 AM, Junio C Hamano gits...@pobox.com wrote: But notice that I said

Re: Git's inconsistent command line options

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 4:43 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: $ git tag --delete master $ echo $? # 0 # actually works as of today! $ git tag delete master # Due to the planned switch to command words, this doesn't work. # For

Re: Git's inconsistent command line options

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 3:06 PM, Stefan Beller sbel...@google.com wrote: On Tue, Aug 25, 2015 at 2:49 PM, Jacob Keller jacob.kel...@gmail.com wrote: On Tue, Aug 25, 2015 at 8:13 AM, Junio C Hamano gits...@pobox.com wrote: On Tue, Aug 25, 2015 at 1:01 AM, Graeme Geldenhuys grae...@gmail.com

Re: What's cooking in git.git (Aug 2015, #04; Tue, 25)

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 4:28 PM, Junio C Hamano gits...@pobox.com wrote: * jk/notes-merge-config (2015-08-17) 6 commits - notes: teach git-notes about notes.name.mergeStrategy option - notes: add notes.mergeStrategy option to select default strategy - notes: add tests for

Re: Git's inconsistent command line options

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 8:13 AM, Junio C Hamano gits...@pobox.com wrote: On Tue, Aug 25, 2015 at 1:01 AM, Graeme Geldenhuys grae...@gmail.com wrote: Even though I have worked with Git since 2009, I still have to reference the help to remind me of what parameter to use in certain situation

Re: Moved code detection with `git apply` a la `git blame -C -C`

2015-08-19 Thread Jacob Keller
Maybe something along the lines of a git-subtree merge. I am not sure how to do that exactly, and I am not sure that it would be worth the trouble to setup for a small case... On Tue, Aug 18, 2015 at 1:11 PM, Anish Tondwalkar tondwal...@virginia.edu wrote: I stashed some changes, then refactored

Re: [PATCH v11 12/13] tag.c: implement '--format' option

2015-08-17 Thread Jacob Keller
On Mon, Aug 17, 2015 at 12:14 PM, Karthik Nayak karthik@gmail.com wrote: On Tue, Aug 18, 2015 at 12:34 AM, Junio C Hamano gits...@pobox.com wrote: Karthik Nayak karthik@gmail.com writes: From: Karthik Nayak karthik@gmail.com Implement the '--format' option provided by

Re: [PATCH v9 3/6] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Jacob Keller
On Mon, Aug 17, 2015 at 3:38 PM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.e.kel...@intel.com writes: From: Jacob Keller jacob.kel...@gmail.com Combining rewrite and notes-merge functionality has been left as an exercise for a future contributor. This comment is probably

Re: [PATCH v8 4/8] notes: allow use of the rewrite terminology for merge strategies

2015-08-17 Thread Jacob Keller
Hi, On Mon, Aug 17, 2015 at 5:54 AM, Johan Herland jo...@herland.net wrote: On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller jacob.e.kel...@intel.com wrote: From: Jacob Keller jacob.kel...@gmail.com notes-merge.c already re-uses the same functions for the automatic merge strategies used

Re: [PATCH v8 8/8] notes: teach git-notes about notes.ref.mergeStrategy option

2015-08-17 Thread Jacob Keller
Hi, On Mon, Aug 17, 2015 at 6:21 AM, Johan Herland jo...@herland.net wrote: Allow me to suggest a different wording, somewhat inspired by the branch.name.* documentation... On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller jacob.e.kel...@intel.com wrote: From: Jacob Keller jacob.kel

[PATCH v9 1/6] notes: document cat_sort_uniq rewriteMode

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 5

[PATCH v9 0/6] implement notes.mergeStrategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com This series implements mergeStrategy configuration options which take the same value as --strategy. This series does not change the allowed refs to merge from or to. There is a known limitation that you cannot merge from refs outside of refs/notes

[PATCH v9 5/6] notes: add notes.mergeStrategy option to select default strategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach git-notes about notes.mergeStrategy to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as cat_sort_uniq without having to pass the -s option manually. Signed-off-by: Jacob Keller

[PATCH v9 6/6] notes: teach git-notes about notes.name.mergeStrategy option

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach notes about a new notes.name.mergeStrategy option for configuring the notes merge strategy when merging into refs/notes/name. This option allows for the selection of merge strategy for particular notes refs, rather than all notes ref merges, as user

[PATCH v9 3/6] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Combining rewrite and notes-merge functionality has been left as an exercise for a future contributor. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- builtin/notes.c | 12 +--- notes-utils.c | 18 ++ notes-utils.h

[PATCH v9 2/6] notes: extract enum notes_merge_strategy to notes-utils.h

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com A future patch will extract parsing of the --strategy string into a helper function in notes.c and will require the enumeration definition. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- notes-merge.h | 10 +++--- notes-utils.h | 8

[PATCH v9 4/6] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310

[PATCH v8 2/8] notes: extract enum notes_merge_strategy to notes-utils.h

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com A future patch will extract parsing of the --strategy string into a helper function in notes.c and will require the enumeration definition. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- notes-merge.h | 10 +++--- notes-utils.h | 8

[PATCH v8 4/8] notes: allow use of the rewrite terminology for merge strategies

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com notes-merge.c already re-uses the same functions for the automatic merge strategies used by the rewrite functionality. Teach the -s/--strategy option how to interpret the equivalent rewrite terminology for consistency. Add tests for the new synonyms

[PATCH v8 7/8] notes: add notes.mergeStrategy option to select default strategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach git-notes about notes.mergeStrategy to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as cat_sort_uniq without having to pass the -s option manually. Signed-off-by: Jacob Keller

[PATCH v8 8/8] notes: teach git-notes about notes.ref.mergeStrategy option

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new option notes.ref.mergeStrategy option which specifies the merge strategy for merging into a given notes ref. This option enables selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want

[PATCH v8 6/8] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310

[PATCH v8 3/8] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Allow future code to re-use the parsing functionality. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- builtin/notes.c | 12 +--- notes-utils.c | 18 ++ notes-utils.h | 1 + 3 files changed, 20 insertions(+), 11

[PATCH v8 0/8] implement notes.mergeStrategy option

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com - Changes since v7 - * add patches to make rewrite and merge take same options * camel case mergeStrategy * move init_notes_check above reading git-config in merge() This is necessary as it ensures refs are inside refs/notes/* It should be noted

[PATCH v8 5/8] notes: implement parse_combine_rewrite_fn using parse_notes_merge_strategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach the rewrite combine notes to use the same names as git-notes merge. This will support all current names plus a few new synonyms. Update documentation to point to NOTES MERGE STRATEGIES to explain the various rewrite options available. Implementing

[PATCH v8 1/8] notes: document cat_sort_uniq rewriteMode

2015-08-17 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 5

Re: [PATCH v11 00/13] port tag.c to use ref-filter APIs

2015-08-16 Thread Jacob Keller
On Sat, Aug 15, 2015 at 11:00 AM, Karthik Nayak karthik@gmail.com wrote: align:: - Implement an `align` atom which left-, middle-, or - right-aligns the content between %(align:..) and - %(end). Followed by `:position,width`, where the + left-, middle-, or

[PATCH v5 3/4] notes: add notes.mergestrategy option to select default strategy

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach git-notes about notes.mergestrategy to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as cat_sort_uniq without having to pass the -s option manually. Signed-off-by: Jacob Keller

[PATCH v5 4/4] notes: teach git-notes about notes.ref.mergestrategy option

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new option notes.ref.mergestrategy option which specifies the merge strategy for merging into a given notes ref. This option enables selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want

[PATCH v5 1/4] notes: document cat_sort_uniq rewriteMode

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2

[PATCH v5 2/4] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310

[PATCH v5 0/4] notes mergestrategy configuration option

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com I have tried to cover all of the comments since the last sending of this series. I am not 100% sure if I got everything, so please feel free to respond again if I missed something. This series implements the notes.mergestrategy option, as well

Re: [PATCH v6 3/4] notes: add notes.mergestrategy option to select default strategy

2015-08-14 Thread Jacob Keller
On Fri, Aug 14, 2015 at 2:06 PM, Eric Sunshine sunsh...@sunshineco.com wrote: const char *value; if (!git_config_get_string_const(key, value)) { if (parse_notes_strategy(value, strategy)) git_die_config(key, unknown notes merge strategy '%s', value);

Re: [PATCH v7 4/4] notes: teach git-notes about notes.ref.mergestrategy option

2015-08-14 Thread Jacob Keller
On Fri, Aug 14, 2015 at 3:10 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Fri, Aug 14, 2015 at 6:01 PM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.e.kel...@intel.com writes: diff --git a/builtin/notes.c b/builtin/notes.c index 12a42b583f98..bdfd9c7d29b4 100644

[PATCH v6 4/4] notes: teach git-notes about notes.ref.mergestrategy option

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new option notes.ref.mergestrategy option which specifies the merge strategy for merging into a given notes ref. This option enables selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want

[PATCH v6 2/4] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310

[PATCH v6 3/4] notes: add notes.mergestrategy option to select default strategy

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach git-notes about notes.mergestrategy to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as cat_sort_uniq without having to pass the -s option manually. Signed-off-by: Jacob Keller

[PATCH v6 0/4] notes.mergestrategy config option

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Changes since v6: * use a static git_config_get_notes_strategy function * use git_die_config to display useful information about which configuration failed. This should address Eric's concern. It also makes it so that we don't even read

[PATCH v6 1/4] notes: document cat_sort_uniq rewriteMode

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2

[PATCH v7 1/4] notes: document cat_sort_uniq rewriteMode

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2

[PATCH v7 3/4] notes: add notes.mergestrategy option to select default strategy

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Teach git-notes about notes.mergestrategy to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as cat_sort_uniq without having to pass the -s option manually. Signed-off-by: Jacob Keller

[PATCH v7 4/4] notes: teach git-notes about notes.ref.mergestrategy option

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new option notes.ref.mergestrategy option which specifies the merge strategy for merging into a given notes ref. This option enables selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want

[PATCH v7 2/4] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-14 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310

Re: [PATCH v7 4/4] notes: teach git-notes about notes.ref.mergestrategy option

2015-08-14 Thread Jacob Keller
On Fri, Aug 14, 2015 at 3:01 PM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.e.kel...@intel.com writes: diff --git a/builtin/notes.c b/builtin/notes.c index 12a42b583f98..bdfd9c7d29b4 100644 --- a/builtin/notes.c +++ b/builtin/notes.c ... @@ -833,7 +833,14 @@ static int

Re: [PATCH v7 1/4] notes: document cat_sort_uniq rewriteMode

2015-08-14 Thread Jacob Keller
On Fri, Aug 14, 2015 at 3:11 PM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.e.kel...@intel.com writes: diff --git a/Documentation/config.txt b/Documentation/config.txt index 75ec02e8e90a..de67ad1fdedf 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 12:16 PM, Jacob Keller jacob.kel...@gmail.com wrote: Oh interesting. I did a test. If you provide a fully qualified ref not inside refs/notes, then it assumes you meant refs/notes/refs/foo/y rather than refs/foo/y I need to do some more digging on this to determine

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 2:57 PM, Jacob Keller jacob.kel...@gmail.com wrote: On Wed, Aug 12, 2015 at 2:46 PM, Johan Herland jo...@herland.net wrote: If we don't already refuse to merge into a ref outside refs/notes, then I would consider that a bug to be fixed, and not some corner use case

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 2:46 PM, Johan Herland jo...@herland.net wrote: If we don't already refuse to merge into a ref outside refs/notes, then I would consider that a bug to be fixed, and not some corner use case that we must preserve for all future. After all, we do already have a test in

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 3:41 PM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.kel...@gmail.com writes: I spoke to soon. We have an init_notes_check function which shows that it does refuse to merge outside of refs/notes/* It prevents all notes operations outside of refs/notes

proper remote ref namespaces

2015-08-12 Thread Jacob Keller
Hello, Recently there was some discussion about git-notes and how we do not fetch notes from remotes by default. The big problem with doing so is because refs/remotes/* hierarchy is only setup for branches (heads), so we don't have any clean location to put them. Around the time of git 1.8.0,

Re: enhanced remote ref namespaces

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 11:54 AM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.kel...@gmail.com writes: Just thinking aloud, perhaps we can introduce a brand new top level hierarchy refs/remote/$O/{heads,tags,notes,...}, and give backward compatibility by making a moral

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Jacob Keller
On Tue, Aug 11, 2015 at 7:26 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: I know that we don't yet have a proper place to put remote notes refs, but the ref in notes.ref.merge _must_ be a local notes ref (you even use the localref notation in the

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 12:09 PM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.kel...@gmail.com writes: On Tue, Aug 11, 2015 at 7:26 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: I know that we don't yet have a proper place to put remote

Re: enhanced remote ref namespaces

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 9:10 AM, Junio C Hamano gits...@pobox.com wrote: Jacob Keller jacob.kel...@gmail.com writes: Recently there was some discussion about git-notes and how we do not fetch notes from remotes by default. The big problem with doing so is because refs/remotes/* hierarchy

[PATCH v4 2/4] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-11 Thread Jacob Keller
From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310

<    5   6   7   8   9   10   11   >