Re: [RFC/PATCH 11/11] branch: add '--points-at' option

2015-07-28 Thread Jacob Keller
On Tue, Jul 28, 2015 at 12:11 AM, Karthik Nayak wrote: > Add the '--points-at' option provided by 'ref-filter'. The option lets > the user to list only branches which points at the given object. > > Add documentation and tests for the same. > > Mentored-by: Christian Couder > Mentored-by: Matthie

Re: [RFC/PATCH 04/11] ref-filter: add 'ifexists' atom

2015-07-28 Thread Jacob Keller
On Mon, Jul 27, 2015 at 11:56 PM, Karthik Nayak wrote: > The 'ifexists' atom allows us to print a required format if the > preceeding atom has a value. If the preceeding atom has no value then Don't you mean "following atom" here? since you do document it as "the next atom" below you should fix t

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Jacob Keller
On Tue, Jul 28, 2015 at 12:11 AM, Karthik Nayak wrote: > Make 'branch.c' use 'ref-filter' APIs for iterating through refs > sorting. This removes most of the code used in 'branch.c' replacing it > with calls to the 'ref-filter' library. > > Make 'tag.c' use the 'filter_refs()' function provided by

builtin/tag.c issue with sort option

2015-07-28 Thread Jacob Keller
When passing "-n" on the command line, if you have configured sort manually, you get an error as it thinks you passed --sort and -n. It should automatically disable tag_sort if it wasn't passed from the command line, as you probably know what you are doing when passing -n I'm attempting to work u

Re: builtin/tag.c issue with sort option

2015-07-28 Thread Jacob Keller
On Tue, Jul 28, 2015 at 3:27 PM, Jacob Keller wrote: > When passing "-n" on the command line, if you have configured sort > manually, you get an error as it thinks you passed --sort and -n. > > It should automatically disable tag_sort if it wasn't passed from the >

Re: [RFC/PATCH 07/11] branch: move 'current' check down to the presentation layer

2015-07-28 Thread Jacob Keller
On Tue, Jul 28, 2015 at 1:12 PM, Karthik Nayak wrote: > On Tue, Jul 28, 2015 at 6:39 PM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> We check if given ref is the current branch in print_ref_list(). Move >>> this check to print_ref_item() where it is checked right before >>> printing.

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Jacob Keller
On Tue, Jul 28, 2015 at 5:56 PM, Michael Haggerty wrote: > Johan Herland writes: >> Here is where we start to differ. I would say that starting a notes >> merge is completely unrelated to your worktree. Consider this: > > It sounds like what a notes merge really wants is a new linked worktree > t

Re: [RFC/PATCH 02/11] ref-filter: add 'colornext' atom

2015-07-29 Thread Jacob Keller
On Wed, Jul 29, 2015 at 2:30 PM, Matthieu Moy wrote: > Eric Sunshine writes: > >> Also, please explain here and in the commit message why this highly >> specialized colorizer ('colornext'), is needed even though a more >> general purpose one ('color') is already available. > > It is needed in the

Re: [PATCH] git-am: flag suspiciously old or futuristic commits

2015-07-29 Thread Jacob Keller
On Wed, Jul 29, 2015 at 3:20 PM, Stefan Beller wrote: > On Wed, Jul 29, 2015 at 3:01 PM, Paul Gortmaker > wrote: >> The linux kernel repository has some commits in it with dates from >> the year 1970 and also 2030 (and possibly others). We probably shouldi >> warn people when the dates look susp

[PATCH 2/2] notes: add notes.merge option to select default strategy

2015-07-31 Thread Jacob Keller
From: Jacob Keller Teach git-notes about a new configuration option "notes.merge" for selecting the default notes merge strategy. Document the option in config.txt and git-notes.txt Add tests for the configuration option. Ensure that command line --strategy option overrides the config

[PATCH 0/2] add notes.merge configuration variable

2015-07-31 Thread Jacob Keller
From: Jacob Keller This small series is a precursor to some thoughts I have for enabling easier notes collaboration. First, make it so that users can configure the default notes merge strategy. Mostly useful if you always want to use cat_sort_uniq. I also found that the rewriteMode supports

[PATCH 1/2] notes: document cat_sort_uniq rewriteMode

2015-07-31 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions

[PATCH v2 0/2] notes: add notes.merge strategy option

2015-07-31 Thread Jacob Keller
From: Jacob Keller This series adds a default merge strategy option for git-notes, so that the user does not have to type "-s" every time. It is overridden by the -s option. I also added some tests to ensure that the "--abort" "--commit" and "-s" opt

[PATCH v2 1/2] notes: document cat_sort_uniq rewriteMode

2015-07-31 Thread Jacob Keller
From: Jacob Keller 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 Cc: Johan Herland Cc: Michael Haggerty Cc: Eric Sunshine --- Documentation/config.txt| 4 ++-- Documentation/git

[PATCH v2 2/2] notes: add notes.merge option to select default strategy

2015-07-31 Thread Jacob Keller
From: Jacob Keller Teach git-notes about a new configuration option "notes.merge" for selecting the default notes merge strategy. Document the option in config.txt and git-notes.txt Add tests for the configuration option. Ensure that command line --strategy option overrides the config

Re: [RFC/PATCH 04/11] ref-filter: add 'ifexists' atom

2015-08-01 Thread Jacob Keller
On Fri, Jul 31, 2015 at 11:46 PM, Karthik Nayak wrote: > On Thu, Jul 30, 2015 at 2:51 AM, Matthieu Moy > wrote: >> Junio C Hamano writes: >> >>> Junio C Hamano writes: >>> > Couldn't think of a better replacer, any suggestions would be welcome :) See below. ... One way t

Re: [RFC/PATCH 07/11] branch: move 'current' check down to the presentation layer

2015-08-01 Thread Jacob Keller
On Fri, Jul 31, 2015 at 11:48 PM, Karthik Nayak wrote: > On Thu, Jul 30, 2015 at 2:57 AM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> What I was thinking of was something like this : >>> >>> struct strbuf format = STRBUF_INIT; >>> char c = ' '; >>> if (current) >>> c = '*'; >>> str

Re: [PATCH v2 2/2] notes: add notes.merge option to select default strategy

2015-08-01 Thread Jacob Keller
On Sat, Aug 1, 2015 at 7:46 PM, Eric Sunshine wrote: > On Fri, Jul 31, 2015 at 7:12 PM, Jacob Keller > wrote: >> Teach git-notes about a new configuration option "notes.merge" for >> selecting the default notes merge strategy. Document the option in >> conf

Re: [PATCH v2 2/2] notes: add notes.merge option to select default strategy

2015-08-02 Thread Jacob Keller
On Sat, Aug 1, 2015 at 7:46 PM, Eric Sunshine wrote: >> If conflicts arise and a strategy for automatically resolving >> -conflicting notes (see the -s/--strategy option) is not given, >> -the "manual" resolver is used. This resolver checks out the >> -conflicting notes in a special worktree (`.g

Re: [PATCH v2 2/2] notes: add notes.merge option to select default strategy

2015-08-02 Thread Jacob Keller
On Sun, Aug 2, 2015 at 1:01 AM, Eric Sunshine wrote: > Don't worry too much about it. Consider it something to keep in mind for > future patches. I reviewed the change and it seemed okay. I mentioned it > because one of the goals of patch submission, in addition to making an > actual change, is to

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

2015-08-02 Thread Jacob Keller
From: Jacob Keller 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 Cc: Johan Herland Cc: Michael Haggerty Cc: Eric Sunshine --- Documentation/config.txt| 4 ++-- Documentation/git

[PATCH v3 3/4] notes: add notes.merge option to select default strategy

2015-08-02 Thread Jacob Keller
From: Jacob Keller Teach git-notes about a new configuration option "notes.merge" for selecting the default notes merge strategy. Document the option in config.txt and git-notes.txt Add tests for use of the configuration option. Include a test to ensure that --strategy correctly ove

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

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

[PATCH RFC 4/4] notes: add per-ref configuration of merge strategy

2015-08-02 Thread Jacob Keller
From: Jacob Keller Teach git-notes about a new configuration option "notes..merge" which selects the merge strategy for a particular ref. This allows selection of merge strategy different for each note reference, in addition to the default strategy for all references. Signed-off

[PATCH v3 0/4] notes: add support for notes.merge option

2015-08-02 Thread Jacob Keller
From: Jacob Keller This series incorporates the feedback from both Johan and Eric. In addition, I included an RFC implementing suggestion from Johan regarding per-ref merge strategies. I split the tests for --merge/--commit/--strategy out into their own patch to help review and keep the &quo

Re: Error pushing new branch: value too great for base (error token is...

2015-08-10 Thread Jacob Keller
On Mon, Aug 10, 2015 at 2:54 AM, Gaurav Chhabra wrote: > Apologies for the delay in reply! I tried your suggestion and it > works. Thanks! :) > > I'm curious why integer comparison is throwing error. Shouldn't i be > comparing numbers with numeric operator? > Yes, but shell doesn't treat hex numb

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

2015-08-11 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions

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

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

[PATCH v4 0/4] add notes strategy configuration options

2015-08-11 Thread Jacob Keller
From: Jacob Keller This series of patches implements notes.merge and notes..merge options for configuring notes merge strategy such that user may avoid typing "-s". It is (probably) most useful if the user wishes to always enforce cat_sort_uniq strategy. This serie

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

2015-08-11 Thread Jacob Keller
From: Jacob Keller Add new option "notes..merge" 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 cat_sort_uniq for all refs

[PATCH v4 3/4] notes: add notes.merge option to select default strategy

2015-08-11 Thread Jacob Keller
From: Jacob Keller Teach git-notes about "notes.merge" 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

proper remote ref namespaces

2015-08-11 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, Joh

Re: enhanced remote ref namespaces

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 9:10 AM, Junio C Hamano wrote: > Jacob Keller 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 is only s

Re: enhanced remote ref namespaces

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 11:54 AM, Junio C Hamano wrote: > Jacob Keller 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 e

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

2015-08-12 Thread Jacob Keller
On Tue, Aug 11, 2015 at 7:26 PM, Junio C Hamano wrote: > Johan Herland writes: > >> I know that we don't yet have a "proper" place to put remote notes refs, >> but the in notes..merge _must_ be a "local" notes ref (you even >> use the notation in the documentation below). Thus, I believe >> we

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

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 12:09 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> On Tue, Aug 11, 2015 at 7:26 PM, Junio C Hamano wrote: >>> Johan Herland writes: >>> >>>> I know that we don't yet have a "proper" place to put rem

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

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 12:16 PM, Jacob Keller 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..merge option

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 2:46 PM, Johan Herland 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 t3308 named 'f

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

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 2:57 PM, Jacob Keller wrote: > On Wed, Aug 12, 2015 at 2:46 PM, Johan Herland 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 mu

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

2015-08-12 Thread Jacob Keller
On Wed, Aug 12, 2015 at 3:41 PM, Junio C Hamano wrote: > Jacob Keller 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/not

[PATCH v5 0/4] notes mergestrategy configuration option

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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 as a notes..mergestrategy option

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions

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

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

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller Add new option "notes..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 cat_sort_uniq for all

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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: Ja

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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 the configuration at all

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller Add new option "notes..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 cat_sort_uniq for all

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions

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

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

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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: Ja

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 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); > return 0; > } >

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions

[PATCH v7 0/4] notes.mergestrategy option(s)

2015-08-14 Thread Jacob Keller
From: Jacob Keller Changes since v6 * Eric suggested a more stream-lined approach for git_config_get_notes_strategy Jacob Keller (4): notes: document cat_sort_uniq rewriteMode notes: add tests for --commit/--abort/--strategy exclusivity notes: add notes.mergestrategy option to select

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller 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: Ja

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

2015-08-14 Thread Jacob Keller
From: Jacob Keller Add new option "notes..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 cat_sort_uniq for all

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

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

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

2015-08-14 Thread Jacob Keller
On Fri, Aug 14, 2015 at 3:01 PM, Junio C Hamano wrote: > Jacob Keller 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,1

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

2015-08-14 Thread Jacob Keller
On Fri, Aug 14, 2015 at 3:10 PM, Eric Sunshine wrote: > On Fri, Aug 14, 2015 at 6:01 PM, Junio C Hamano wrote: >> Jacob Keller writes: >>> diff --git a/builtin/notes.c b/builtin/notes.c >>> index 12a42b583f98..bdfd9c7d29b4 100644 >>> --- a/built

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 wrote: > Jacob Keller writes: > >> diff --git a/Documentation/config.txt b/Documentation/config.txt >> index 75ec02e8e90a..de67ad1fdedf 100644 >> --- a/Documentation/config.txt >> +++ b/Documentation/co

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 wrote: > > align:: > - Implement an `align` atom which left-, middle-, or > - right-aligns the content between %(align:..) and > - %(end). Followed by `:,`, where the > + left-, middle-, or right-align the content between %

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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 --- notes-merge.h | 10 +++--- notes-utils.h | 8 2 files changed, 11 insertions(+), 7

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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. Teaching rewrite how to

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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: Ja

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller Add new option "notes..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 cat_sort_uniq for all

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

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

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

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

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller - 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 that git-notes already

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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 rewrite functionality

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 5 +++-- 2 files changed, 5 insertions(+), 4

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

2015-08-17 Thread Jacob Keller
Hi, On Mon, Aug 17, 2015 at 6:21 AM, Johan Herland wrote: > Allow me to suggest a different wording, somewhat inspired by the > branch..* documentation... > > On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller > wrote: >> From: Jacob Keller >> >> Add new option &q

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 wrote: > On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller > wrote: >> From: Jacob Keller >> >> notes-merge.c already re-uses the same functions for the automatic merge >> strategies used by the rewrite function

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach notes about a new "notes..mergeStrategy" option for configuring the notes merge strategy when merging into refs/notes/. This option allows for the selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want cat

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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 --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 5 +++-- 2 files changed, 5 insertions(+), 4

[PATCH v9 0/6] implement notes.mergeStrategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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 (precluding the use of such

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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: Ja

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller 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 --- notes-merge.h | 10 +++--- notes-utils.h | 8 2 files changed, 11 insertions(+), 7

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

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

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

2015-08-17 Thread Jacob Keller
From: Jacob Keller Combining rewrite and notes-merge functionality has been left as an exercise for a future contributor. Signed-off-by: Jacob Keller --- builtin/notes.c | 12 +--- notes-utils.c | 18 ++ notes-utils.h | 1 + 3 files changed, 20 insertions(+), 11

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 wrote: > On Tue, Aug 18, 2015 at 12:34 AM, Junio C Hamano wrote: >> Karthik Nayak writes: >> >>> From: Karthik Nayak >>> >>> Implement the '--format' option provided by 'ref-filter'. >>> This lets the user list tags as per desired format similar >

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 wrote: > Jacob Keller writes: > >> From: Jacob Keller >> >> Combining rewrite and notes-merge functionality has been left as an >> exercise for a future contributor. > > This comment is probably unnecessary; we

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

2015-08-18 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 wrote: > I stashed some changes, then refactored my code to move the fu

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 wrote: > On Tue, Aug 25, 2015 at 1:01 AM, Graeme Geldenhuys 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 simply because similar tasks

Re: Git's inconsistent command line options

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 3:06 PM, Stefan Beller wrote: > On Tue, Aug 25, 2015 at 2:49 PM, Jacob Keller wrote: >> On Tue, Aug 25, 2015 at 8:13 AM, Junio C Hamano wrote: >>> On Tue, Aug 25, 2015 at 1:01 AM, Graeme Geldenhuys >>> wrote: >>>> >>>&g

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 wrote: > * jk/notes-merge-config (2015-08-17) 6 commits > - notes: teach git-notes about notes..mergeStrategy option > - notes: add notes.mergeStrategy option to select default strategy > - notes: add tests for --commit/--abort/--strategy exclusiv

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 wrote: > Stefan Beller 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 details see road map a

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

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 11:07 PM, Matthieu Moy wrote: > Christian Couder 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 of >> code: change we made' > > I confirm tha

Re: Git's inconsistent command line options

2015-08-25 Thread Jacob Keller
On Tue, Aug 25, 2015 at 11:28 PM, Andreas Schwab wrote: > Jacob Keller 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.

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 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 commands and try

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

2015-08-26 Thread Jacob Keller
From: Jacob Keller 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 probably set

Re: Git's inconsistent command line options

2015-08-26 Thread Jacob Keller
On Wed, Aug 26, 2015 at 3:52 PM, Philip Oakley wrote: > From: "Jacob Keller" >> >> On Wed, Aug 26, 2015 at 10:56 AM, Junio C Hamano >> wrote: >>> >>> But notice that I said "if you really want to". I personally think >>> it is

Re: Git's inconsistent command line options

2015-08-26 Thread Jacob Keller
On Wed, Aug 26, 2015 at 4:02 PM, Jacob Keller wrote: > On Wed, Aug 26, 2015 at 3:52 PM, Philip Oakley wrote: >> From: "Jacob Keller" >>> >>> On Wed, Aug 26, 2015 at 10:56 AM, Junio C Hamano >>> wrote: >>>> >>>> But notice

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 (adapter->hw.phy.ops.enter_lplu) { >

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 > original name of the

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 for a while. Especially since implementin

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

2015-09-05 Thread Jacob Keller
On Sat, Sep 5, 2015 at 9:38 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >> On Sun, Sep 6, 2015 at 3:55 AM, Jacob Keller wrote: >>> On Sat, Sep 5, 2015 at 10:52 AM, Rudy Matela wrote: >>>> >>>> Allow -n and --sort=version:refname to

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 "GIT_FOO=NoThanks; export GIT

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 want to start a flame-war > a

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 wrote: > 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 recommendatio

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 other

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 wrote: > Jacob Keller 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 nice long patch cover letter in >> vim before

  1   2   3   4   5   6   7   8   9   10   >