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

2015-08-26 Thread Matthieu Moy
Junio C Hamano writes: > Junio C Hamano writes: > >> Matthieu Moy writes: >> >>>> For the current code %(if:empty)%(align)%(end)%(then)Empty%(else)Not >>>> Empty%(end) >>>> would print non-empty, I guess the documentation holds in that c

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

2015-08-26 Thread Matthieu Moy
)%(end)%(then)Empty%(else)Not > Empty%(end) > would print non-empty, I guess the documentation holds in that case. > Not sure if we require it to print non-empty. You don't want the %(if) condition to depend on whether --shell/--python/... is used. Since %(if:empty)%(align)%(end)%

Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-26 Thread Matthieu Moy
.git/refs/heads/symref $ git branch -a * branch master symref -> branch The only remaining difference I see are the "remotes/" prefix and colors. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-08-25 Thread Matthieu Moy
the line above. # Everything below will be removed. diff --git a/git-multimail/README b/git-multimail/README index f41906b..93d4751 100644 Signed-off-by: Matthieu Moy --- a/git-multimail/README +++ b/git-multimail/README Either commit-msg should be called after stripping the diff

Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-25 Thread Matthieu Moy
ut that will not work if the difference between local and remote > format is not merely textual (e.g. paint them in different color). Hmm, yes, colors would be difficult to get with this solution. Perhaps a %(refname:autoprefix,autocolor) that would pick the color and do the textual renderin

Re: [PATCH v13 04/12] ref-filter: implement an `align` atom

2015-08-24 Thread Matthieu Moy
stand if you made append_atom() the handler for a > non-magic atoms, which would let you do the above without any if/else > and just a single unconditional I can't decide between "ah, very elegant" and "no, too much magic" ;-). I lean towards the former. -- Matthie

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

2015-08-24 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Aug 24, 2015 at 1:30 AM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> diff --git a/Documentation/git-for-each-ref.txt >>> b/Documentation/git-for-each-ref.txt >>> index 1997657..06d468e 100644 >>&

Re: [PATCH v13 11/12] tag.c: implement '--format' option

2015-08-24 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Aug 24, 2015 at 1:26 AM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> --- a/Documentation/git-tag.txt >>> +++ b/Documentation/git-tag.txt >>> @@ -13,7 +13,8 @@ SYNOPSIS >>>[ | ] >

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

2015-08-23 Thread Matthieu Moy
d %(end) is quoted. There's no --quote, there are --shell, --python, ... (well, actually, I would have prefered to have a single --quote=language option, but that's not how it is now). I had already commented on a preliminary version of this series off-list. I think all my previous comme

Re: [PATCH v13 11/12] tag.c: implement '--format' option

2015-08-23 Thread Matthieu Moy
The object that the new tag will refer to, usually a commit. > Defaults to HEAD. > > +:: Shouldn't this be --format , not just ? We usually use the named argument in the SYNOPSIS for positional arguments, but not for arguments following an option. -- Matthieu Moy http://ww

Re: [PATCH] trailer: ignore first line of message

2015-08-21 Thread Matthieu Moy
ubject line in `git log --oneline`. My command above with a commit-msg hook outputs: [master 86f32d5] place of: code: change we made Signed-off-by: Matthieu Moy (on a single line) I do not care deeply, but you may want to let interpret-trailers deal with this case too. Thanks, -- Matth

Re: [PATCH v12 03/13] ref-filter: introduce the ref_formatting_state stack machinery

2015-08-20 Thread Matthieu Moy
r) echo %(refname) %(end) ' I'm not sure what's best, but if both can make sense, perhaps we should just keep the simplest to implement, i.e. the current behavior. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscrib

Minor annoyance with 'git interpret-trailers'

2015-08-20 Thread Matthieu Moy
without a blank line: foo: do something Signed-off-by: Matthieu Moy This breaks the convention "One summary line, one blank line, and then body", and shows my sign-off in the output of "git log --oneline" :-(. I think the behavior "don't insert a newline if the

Re: [PATCH v12 03/13] ref-filter: introduce the ref_formatting_state stack machinery

2015-08-20 Thread Matthieu Moy
lly necessary, but it doesn't harm and it makes sense since the escape sequence contains a '[' which is a shell metacharacter. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-08-19 Thread Matthieu Moy
Karthik Nayak writes: > On Thu, Jul 30, 2015 at 12:59 PM, Matthieu Moy > wrote: > >> IIRC, historicaly Git allowed some weirdly named refs which made some >> commands ambiguous (e.g. a branch named after an option like '-d'). >> We're forbidding their

Re: [PATCH v12 03/13] ref-filter: introduce the ref_formatting_state stack machinery

2015-08-19 Thread Matthieu Moy
stances always have the same value? There's nothing to be pushed or poped with quote_style, so having it in the stack is confusing to the reader (one has to infer the property "all instances have the same value" by reading the code instead of having just one variable), and error-p

Re: [PATCH v2 5/8] branch: drop non-commit error reporting

2015-08-19 Thread Matthieu Moy
Karthik Nayak writes: > Remove the error reporting variable to make the code easier to port > over to using ref-filter APIs. This variable is not require as in s/is not require/&d/ -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line &q

Re: [PATCH v2 3/8] branch: roll show_detached HEAD into regular ref_list

2015-08-19 Thread Matthieu Moy
at the end "so that it can be printed first."). Perhaps "... so that it can be printed and removed first.". -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...

Re: [PATCH v12 03/13] ref-filter: introduce the ref_formatting_state stack machinery

2015-08-19 Thread Matthieu Moy
mv->handler) atomv->handler(atomv, &state); - append_atom(atomv, state); + else + append_atom(atomv, state); } if (*cp) { sp = cp + strlen(cp); Unless I missed something, this s

Re: [PATCH v12 01/13] ref-filter: move `struct atom_value` to ref-filter.c

2015-08-19 Thread Matthieu Moy
a supporting atom")); You error out on %(end) without %(align), but not on %(align) without %(end). You should probably check that the stack is empty at the end and error out otherwise. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsub

Re: [PATCH v12 10/13] tag.c: use 'ref-filter' data structures

2015-08-19 Thread Matthieu Moy
f_filter *filter) in ref-filter.c, since for-each-ref, branch and tag will eventually have the same set of constraints on the options. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-08-19 Thread Matthieu Moy
tag" and "git branch" are meant to be simple commands, and the scary swiss-army-knife should remain "git for-each-ref". I am still (slightly) in favor of adding --format to tag and branch, as long as it does not make the commands too scary. -- Matthieu Moy http://ww

Re: [PATCH] git-am: add am.threeWay config variable

2015-08-19 Thread Matthieu Moy
Paul Tan writes: > On Tue, Aug 18, 2015 at 5:36 PM, Matthieu Moy > wrote: >> I don't remember the details of the regression we had with the shell >> version, but that would probably deserve an additional test to enforce >> the "Hopefully there will be no

Re: [PATCH] git-am: add am.threeWay config variable

2015-08-18 Thread Matthieu Moy
ll version, but that would probably deserve an additional test to enforce the "Hopefully there will be no regressions" part of your message. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

Re: [PATCH 01/10] ref-filter: add option to filter only branches

2015-08-13 Thread Matthieu Moy
x8 >#define FILTER_REFS_DETACHED_HEAD 0x16 You meant 0x10, not 0x16 I guess. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-09 Thread Matthieu Moy
Using a linked list of sorts where whenever a new modifier atom is >encountered >a new state is created, and once %(end) is encountered we can pop that >state >into the previous state. Good, but keep in mind that this is not needed to port tag/branch, and your GSoC end soon. So keep your

Re: [PATCH v7 0/11] port tag.c to use ref-filter APIs

2015-08-02 Thread Matthieu Moy
think the test would be better with padright:15 for example, to show that some lines are aligned and some go beyond the 15 columns. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] pull.sh: quote $upload_pack when passing it to git-fetch

2015-07-30 Thread Matthieu Moy
The previous code broke for example git pull --upload-pack 'echo --foo' Reported-by: Joey Hess Fix-suggested-by: Junio C Hamano Signed-off-by: Matthieu Moy --- Junio wrote: > ${upload_pack+"$upload_pack"} or something. Indeed, we need to pass nothing, not the empty

Re: git pull --upload-pack reversion in git 2.5.0

2015-07-30 Thread Matthieu Moy
mbiguous parsing of abbreviated options, bundled short options, separate form options and to provide consistent usage help, use git-rev-parse --parseopt for option parsing. With this, simplify the option parsing code. Signed-off-by: Paul Tan Signed-off-by: Junio C Hamano

Re: What's cooking in git.git (Jul 2015, #07; Mon, 27)

2015-07-30 Thread Matthieu Moy
;pencils down' date" is August 17th. The "Firm 'pencils down date'" is on 21th, so things should stabilize. On the "unify ref-listing commands" side, the big code movement is in kn/for-each-ref which should hit master soon, but there are other less in

Re: [PATCH v6 0/10] port tag.c to use ref-filter APIs

2015-07-30 Thread Matthieu Moy
SV/...) and pipe it to a formatter written in a real programming language. It will always be more powerful than having to chose in a limited set of %(atoms). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state'

2015-07-30 Thread Matthieu Moy
orgetting to reset, as "use" and "reset" would be next to each other in the code. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-07-30 Thread Matthieu Moy
Karthik Nayak writes: > On Wed, Jul 29, 2015 at 9:26 PM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy >>> wrote: >>>> >>>> I'm not sure what's the convention, but I

Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state'

2015-07-29 Thread Matthieu Moy
set (currently true I think), to avoid the risk of forgetting one value to reset. I'm fine with the other way around too. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-07-29 Thread Matthieu Moy
next:blue)%(ifexists:[%s]) to color only the replacement of %s and not the []. But I now think that this would be more elegantly solved by Junio's %(if) %(endif) idea: %(if:atom) [ %(color:blue)%(atom)%(color:reset) ] %(endif) (I added spaces for clarity) -- Matthieu Moy http://www-verim

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

2015-07-29 Thread Matthieu Moy
d format that the user can't reproduce with the --format option, since it means you can't easily make a small variation on it. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-07-29 Thread Matthieu Moy
ince the content of the if/endif is a format string like the others, it can use the same escaping rules (IIRC, %% to escape a %). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] ref-filter: fix indentation

2015-07-29 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Signed-off-by: Matthieu Moy >> --- >> This is meant to be applied on top of kn/for-each-ref. > > Hmm, as 2.5 is already out and we can rewind 'next' in the coming > couple of days, I am tempted to squ

Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state'

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > On Wed, Jul 29, 2015 at 9:34 PM, Matthieu Moy > wrote: >> Karthik Nayak writes: >> >>> Ah, I hate making grammatical errors, Even though I check it always gets >>> away. >>> Anyways waiting for Junio and others to reply on

Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state'

2015-07-29 Thread Matthieu Moy
th a resend as it should make it easier for new reviewers. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Log messages beginning # and git rebase -i

2015-07-29 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Duy Nguyen writes: >> >>> On Wed, Jul 29, 2015 at 12:48 AM, Matthieu Moy >>> wrote: >>>>> If the user wants whatever she types in the resulting commit >>>>> literally, ther

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

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy > wrote: >> >> I'm not sure what's the convention, but I think the test description >> should give the expected behavior even with test_expect_failure. >> >> And please help the

[PATCH] ref-filter: fix indentation

2015-07-29 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- This is meant to be applied on top of kn/for-each-ref. ref-filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 43502a4..3fbbbeb 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -868,8 +868,8 @@ static

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

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy > wrote: > >>> - qsort(array.items, index, sizeof(struct ref_array_item *), ref_cmp); >>> + if (!sorting) { >>> + def_sorting.next = NULL; >>> +

Re: Log messages beginning # and git rebase -i

2015-07-29 Thread Matthieu Moy
Duy Nguyen writes: > On Wed, Jul 29, 2015 at 12:48 AM, Matthieu Moy > wrote: >>> If the user wants whatever she types in the resulting commit >>> literally, there is the "--cleanup=" option, no? >> >> $ GIT_EDITOR=touch git commit --cleanup=verbatim

Re: Log messages beginning # and git rebase -i

2015-07-29 Thread Matthieu Moy
line that comes from the payload that begins with the > core.commentchar or a backslash with a backslash. That's it, probably the hardest part. No Git time budget for now, but I'm adding this here in case I get time or a student to work on it: http://git.wiki.kernel.org/index.php/SmallProj

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy > wrote: >> Christian Couder writes: >> >>> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak >>> wrote: >>> >>>> +static void ref_array_append(struct ref_array *ar

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

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > 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 >

Re: [RFC/PATCH 06/11] branch: roll show_detached HEAD into regular ref_list

2015-07-29 Thread Matthieu Moy
Karthik Nayak writes: > On Tue, Jul 28, 2015 at 6:31 PM, Matthieu Moy > wrote: >> >>> -static void show_detached(struct ref_list *ref_list, int maxwidth) >>> -{ >>> - struct commit *head_commit = >>> lookup_commit_reference_gentl

Re: [RFC/PATCH] Port branch.c to use ref-filter APIs

2015-07-28 Thread Matthieu Moy
Karthik Nayak writes: > On Tue, Jul 28, 2015 at 7:05 PM, Matthieu Moy > wrote: > >> Ideally, you could also have a modifier atom %(alignleft) [...] > > This could work for refname, as each ref_array_item holds the refname, > But other atoms are only filled in after a cal

Re: Log messages beginning # and git rebase -i

2015-07-28 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Actually, is there any reason why we do not allow a simple escaping like >> >> \# this is a line starting with # >> \\ this is a line starting with \ >> # this is a comment > > What are we trying to ach

Re: Log messages beginning # and git rebase -i

2015-07-28 Thread Matthieu Moy
allow a simple escaping like \# this is a line starting with # \\ this is a line starting with \ # this is a comment ? -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2015-07-28 Thread Matthieu Moy
expect_failure 'git branch does not show badly named ref' ' I'm not sure what's the convention, but I think the test description should give the expected behavior even with test_expect_failure. And please help the reviewers by saying what's the status wrt this test (any plan on how to fix it?). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC/PATCH 09/11] branch.c: use 'ref-filter' data structures

2015-07-28 Thread Matthieu Moy
s[array->nr - 1]; >> + REALLOC_ARRAY(array->items, array->nr + 1); >> + array->items[array->nr++] = ref; >> +} > > This function belongs more to ref-filter.{c,h}... The function disapears in the next commit, but I also think that this function

Re: [RFC/PATCH 03/11] ref-filter: add option to filter only branches

2015-07-28 Thread Matthieu Moy
F_LOCAL_BRANCH, "refs/heads/" }, > + { REF_REMOTE_BRANCH, "refs/remotes/" }, > + }; Nit: I would swap the order of fields, to make it a bit clearer that this is a kind of dictionary key -> value (I think it's more common to write it in this order tha

Re: [RFC/PATCH] Port branch.c to use ref-filter APIs

2015-07-28 Thread Matthieu Moy
to display the whole ref_array could help. It would avoid having each caller write the 'for' loop) Ideally, you could also have a modifier atom %(alignleft) that would not need an argument and that would go through the ref_array to find the maxwidth, and do the alignment. That would

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

2015-07-28 Thread Matthieu Moy
is the current branch", and the Boolean is turned into presentation directives in a separate piece of code. I'd write char c; int current = 0; ... if (...) current = 1; ... case REF_DETACHED_HEAD: current = 1; ... and keep the last hunk. (IOW, turn current from a parameter into a local variable) -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC/PATCH 06/11] branch: roll show_detached HEAD into regular ref_list

2015-07-28 Thread Matthieu Moy
**argv, const char > *prefix) > die(_("branch name required")); > return delete_branches(argc, argv, delete > 1, kinds, quiet); > } else if (list) { > - int ret = print_ref_list(kinds, detached, verbose, abbrev, > +

Re: [RFC/PATCH 05/11] branch: fix width computation

2015-07-28 Thread Matthieu Moy
; detached = (detached && (kinds & REF_LOCAL_BRANCH)); > if (detached && match_patterns(pattern, "HEAD")) > - show_detached(&ref_list); > + show_detached(&ref_list, maxwidth); This hunks could ideally go in a prepara

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

2015-07-28 Thread Matthieu Moy
eset)]||foo1.6 > +EOF > + > +test_expect_success 'check `ifexists` with `colornext` format option' ' > + git for-each-ref > --format="%(ifexists:[%s])%(colornext:green)%(refname:short)||%(refname:short)" > | grep "foo" >actual && > +

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

2015-07-28 Thread Matthieu Moy
nd only this one. Similarly to what I suggested for padright, I'd suggest --format="%(refname:short)%(colornext:green)|%(refname:short)|%(refname:short)|" -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC/PATCH 01/11] ref-filter: add "%(objectname:size=X)" option

2015-07-28 Thread Matthieu Moy
If you have other higher-priorities task, leave a temporary comment /* FIXME: ... */ or /* TODO: ... */ and make sure you have no such comment when you drop the "RFC" in the subject of your emails. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: sen

Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state'

2015-07-28 Thread Matthieu Moy
ms have no immediate side effect, but only s/pesudo/pseudo/. But if you are to rename these atoms to "modifier atoms", you should get rid of this "pseudo" here. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe g

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Jul 27, 2015 at 9:24 PM, Matthieu Moy > wrote: >> Yes, but on the other hand we already have: >> >> git log --format='%<|(50)A very long irrevlevancy|%an|' >> >> that pads/truncate %an. So, consistancy would d

Re: [PATCH v5 07/11] ref-filter: add option to match literal pattern

2015-07-27 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Jul 27, 2015 at 9:27 PM, Karthik Nayak wrote: >> On Mon, Jul 27, 2015 at 6:24 PM, Matthieu Moy >> wrote: >>> Karthik Nayak writes: >>> >>>> --- a/ref-filter.c >>>> +++ b/ref-filter.c >>>> @@ -

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> See my remark on previous patch: this test is not sufficient. You do >> not only need to check that %(padright) is taken into account, but you >> also need to check that it is taken into account for the right atom a

Re: [PATCH v5 02/11] ref-filter: make `color` use `ref_formatting_state`

2015-07-27 Thread Matthieu Moy
emit(cp, sp); > get_ref_atom_value(info, parse_ref_filter_atom(sp + 2, ep), > &atomv); > - print_value(&state, atomv); > + if (atomv->pseudo_atom) > + apply_pseudo_state(&state, atomv); > + els

Re: [PATCH v5 07/11] ref-filter: add option to match literal pattern

2015-07-27 Thread Matthieu Moy
icitly "... matches a pattern "refs/heads/" but not "refs/heads/m")", but I won't insist on that. Just a reminder in case you missed it. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git"

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Matthieu Moy
test_done See my remark on previous patch: this test is not sufficient. You do not only need to check that %(padright) is taken into account, but you also need to check that it is taken into account for the right atom and only this one. I'd suggest --format '%(refname)%(padright:25)|%(

Re: [PATCH v5 02/11] ref-filter: make `color` use `ref_formatting_state`

2015-07-27 Thread Matthieu Moy
attributes * Atoms that take action immediately, but that are not ref attributes like %(color) * Atoms that only act as modifiers for the next atom. Perhaps they could be called "prefix atoms" or "modifier atoms". -- Matthieu Moy http://www-verimag.imag.fr/~moy

Re: [PATCH v5 01/11] ref-filter: introduce 'ref_formatting_state'

2015-07-27 Thread Matthieu Moy
&state, atomv); - else + else { print_value(&state, atomv); + reset_formatting_state(&state); + } + } if (*cp) { sp = cp + strlen(cp); -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 01/10] ref-filter: add option to align atoms to the left

2015-07-27 Thread Matthieu Moy
does not change in time hence a tag avoids mistakenly changing it. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: "git am" and then "git am -3" regression?

2015-07-27 Thread Matthieu Moy
doing 1) is probably a good idea anyway, there's no reason to hold the release for such minor feature. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 9/9] tag.c: implement '--merged' and '--no-merged' options

2015-07-22 Thread Matthieu Moy
ified). You may want to spell it `HEAD` (with backticks). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 8/9] tag.c: implement '--format' option

2015-07-22 Thread Matthieu Moy
ve the --format option, so it does not test what it claims. Also, why does "git tag"'s %(refname) behave like "git for-each-ref"'s %(refname:short)? I find it very confusing as I think --format's argument should be interpreted the same way for all ref-l

Re: [PATCH v3 5/9] ref-filter: add option to match literal pattern

2015-07-22 Thread Matthieu Moy
; but not "refs/heads/m") ^^ ... (I find it frustrating when the docstrings for two function look identical and I have to find out the 1-character difference to understand ...) -- Matthieu Moy http://www-verimag.imag.fr/

Re: [PATCH v3 1/9] ref-filter: add option to align atoms to the left

2015-07-22 Thread Matthieu Moy
, 10, &ref->align_value)) die(_("positive integer expected after ':' in align:%u\n", ref_align_value)); -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 01/10] ref-filter: add %(refname:shortalign=X) option

2015-07-11 Thread Matthieu Moy
Karthik Nayak writes: > On Thu, Jul 9, 2015 at 6:28 PM, Matthieu Moy > wrote: > >> I think this would deserve a test and documentation. Even though your >> motivation is for an internal implementation, some users may want to use >> the feature in 'git for-each-re

Re: [PATCH v2 05/10] ref-filter: add option to match literal pattern

2015-07-11 Thread Matthieu Moy
ar" leads to a strange sentence, since the path name match is also a kind of pattern-matching. I'd write Since 'ref-filter' only has an option to match path names, add an option for plain fnmatch pattern-matching. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsu

Re: [PATCH v2 04/10] ref-filter: add support to sort by version

2015-07-10 Thread Matthieu Moy
Karthik Nayak writes: > On Fri, Jul 10, 2015 at 4:22 PM, Karthik Nayak wrote: >> On Thu, Jul 9, 2015 at 6:59 PM, Matthieu Moy >> wrote: >>> Karthik Nayak writes: >>> >>>> Add support to sort by version using the "v:refname" and >&

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Matthieu Moy
is kind of issues, it may make sense to run "format-patch" and "send-email" as two separate steps. This way, you can re-run "send-email" on the pieces which failed manually (adjusting --in-reply-to). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe fro

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Matthieu Moy
Karthik Nayak writes: > + s->atom = parse_ref_filter_atom(arg, arg+len); Spaces around +. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordo

Re: [PATCH v2 05/10] ref-filter: add option to match literal pattern

2015-07-09 Thread Matthieu Moy
;) or a wildcard (e.g. the same ref > + * matches "refs/heads/m*",too). Missing space after , (same in the hunk context below) -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 04/10] ref-filter: add support to sort by version

2015-07-09 Thread Matthieu Moy
shown me this immediately. Some hints in the commit message would clearly have helped too. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 03/10] ref-filter: support printing N lines from tag annotation

2015-07-09 Thread Matthieu Moy
t; int quote_style); > +void show_ref_array_item(struct ref_array_item *info, const char *format, > int quote_style, unsigned int lines); I would add "If lines > 0, prints the first 'lines' no of lines of the object pointed to" or so to the docstring. -- Matthieu Moy

Re: [PATCH v2 01/10] ref-filter: add %(refname:shortalign=X) option

2015-07-09 Thread Matthieu Moy
s printed. Not really an issue, but you're wrapping your text at ~60 characters. The common use is to wrap around 70 to 80. Using Emacs, auto-fill-mode or M-q does this automatically. If you use another text editor, it can probably do that for you too. > Mentored-by: Christian Couder >

Re: [PATCH v2 08/10] tag.c: use 'ref-filter' APIs

2015-07-09 Thread Matthieu Moy
hich make it unapplicable. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4] log: add log.follow config option

2015-07-09 Thread Matthieu Moy
/git-log.txt | 6 ++ > builtin/log.c | 16 > diff.c| 5 +++-- > diff.h| 1 + > t/t4202-log.sh| 23 +++ > 5 files changed, 49 insertions(+), 2 deletions(-) -- Matthieu Moy http://

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Matthieu Moy
Karthik Nayak writes: > On Wed, Jul 8, 2015 at 2:37 PM, Matthieu Moy > wrote: >> Torsten Bögershausen writes: >> >>> Could we have a tweak for people without gpg? >> >> I guess we need stg like >> >> if ! test_have_prereq GPG; then >&g

Re: [PATCH v8 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-07-08 Thread Matthieu Moy
sts will rely on it. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3] log: add log.follow config option

2015-07-08 Thread Matthieu Moy
ace fix, the patch looks good to me. I'm not sure it fully addresses Junio's concern about v2 though. Thanks, -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.k

Re: [PATCH v8 07/10] send-email: reduce dependencies impact on parse_address_line

2015-07-08 Thread Matthieu Moy
' > # at /Users/tb/NoBackup/projects/git/git.next/t/t9000/test.pl line 62. > # Structures begin differing at: > # $got->[0] = '"Jane \ Doe" ' > # $expected->[0] = '"Jane\ Doe" ' ? If so, it seems to be the way Perl&#x

Re: [PATCH v6 3/4] status: give more information during rebase -i

2015-07-08 Thread Matthieu Moy
t; shouldn't be a problem, but just double checking if you folks > considered the ramifications already. 16cf51c7 adds rebase.instructionFormat that allows changing the part after in the todo-list, but this part is not parsed by our patch. So it's OK. -- Matthieu Moy http://www

Re: No one understands diff3 "Temporary merge branch" conflict markers

2015-07-07 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> ... I would say: the >> recursive merge-base was computed internally, but not really meant to be >> shown to the user. > > I wonder if the output becomes easier to read if we unconditionally > turned off

Re: [PATCH v2] log: add log.follow config option

2015-07-07 Thread Matthieu Moy
t; +test_expect_success \ > +'git config log.follow is overridden by --no-follow' \ > +'test_config log.follow true && > + git log --no-follow --name-status --pretty="format:%s" path1 > current' ... because you're overwriting it here. &

Re: No one understands diff3 "Temporary merge branch" conflict markers

2015-07-07 Thread Matthieu Moy
were no conflict in this hunk, hence you don't see the merge base. I hope this helps on the "light and understanding" part of your question. Now, as of "what to do when I get this?", I would say: the recursive merge-base was computed internally, but not really meant to be shown to the user. You should probably ignore it and resolve the merge by looking only at the 2 sides of the conflict ("ours" and "theirs"). Sorry, this is probably not the answer you expected, but it's the best I can give ;-). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v8 07/10] send-email: reduce dependencies impact on parse_address_line

2015-07-07 Thread Matthieu Moy
commentaries. Signed-off-by: Remi Lespinet Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- Since v7: portability fix on the final exit() in the perl script. git-send-email.perl | 2 +- perl/Git.pm | 67 t/t9000-address

Re: [PATCH v7 07/10] send-email: reduce dependencies impact on parse_address_line

2015-07-07 Thread Matthieu Moy
=t ./t9000-addresses.sh Indeed, is_passing seems too recent for your version of perl. A similar problem was solved in t9700 by 635155f (t9700: Use Test::More->builder, not $Test::Builder::Test, 2010-06-26). I'll use the same solution: my $is_passing = eval { Test::More->is_passing

[PATCH v6 0/4] status: give more information during rebase

2015-07-06 Thread Matthieu Moy
This is almost identical to v5. I turned git_path(var) into git_path("%s", var) as Junio noticed, but I still prefer my version on the other points discussed. Guillaume Pagès (4): status: factor two rebase-related messages together status: differentiate interactive from non-interactive rebases

[PATCH v6 3/4] status: give more information during rebase -i

2015-07-06 Thread Matthieu Moy
: Guillaume Pagès Signed-off-by: Junio C Hamano Signed-off-by: Matthieu Moy --- t/t7512-status-help.sh | 111 +++ wt-status.c| 114 + 2 files changed, 225 insertions(+) diff --git a/t/t7512

<    2   3   4   5   6   7   8   9   10   11   >