Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-06-14 Thread Jeff King
On Tue, Jun 13, 2017 at 04:08:03PM -0700, Jonathan Nieder wrote: > > +test_expect_success 'generate builtin list' ' > > + git --list-builtins >builtins > > +' > > + > > +while read builtin > > +do > > + test_expect_success "$builtin can handle -h" ' > > + test_expect_code 129 git

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-06-13 Thread Jonathan Nieder
Hi, Jeff King wrote: > --- a/t/t0012-help.sh > +++ b/t/t0012-help.sh > @@ -49,4 +49,16 @@ test_expect_success "--help does not work for guides" " > test_i18ncmp expect actual > " > > +test_expect_success 'generate builtin list' ' > + git --list-builtins >builtins > +' > + > +while

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-06-01 Thread Junio C Hamano
Jeff King writes: > If we don't mind a one-time pain, I think we can just convert the > existing usage() to something more like usage_with_options(). The patch > below does that (and teaches the latter to handle a NULL options field). > > The diff is ugly, and the conversion is

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-06-01 Thread Jeff King
On Thu, Jun 01, 2017 at 02:54:08PM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > > For now, I will mix this in when queuing the whole thing in 'pu', as > > I hate to push out something that does not even work for me to the > > general public. > > > > -- >8 -- > >

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-06-01 Thread Jeff King
On Thu, Jun 01, 2017 at 02:42:13PM +0900, Junio C Hamano wrote: > For now, I will mix this in when queuing the whole thing in 'pu', as > I hate to push out something that does not even work for me to the > general public. > > -- >8 -- > Subject: [PATCH] diff- and log- family: handle "git cmd -h"

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-31 Thread Junio C Hamano
Junio C Hamano writes: > For now, I will mix this in when queuing the whole thing in 'pu', as > I hate to push out something that does not even work for me to the > general public. > > -- >8 -- > Subject: [PATCH] diff- and log- family: handle "git cmd -h" early > ... And

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-31 Thread Junio C Hamano
Junio C Hamano writes: > Heh, I found another ;-) > > 95e98cd9 ("revision.c: use refs_for_each*() instead of > for_each_*_submodule()", 2017-04-19), which is in the middle of > Duy's nd/prune-in-worktree series, does this: > ... > when jk/consistent-h is merged into it and

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-31 Thread Jeff King
On Thu, Jun 01, 2017 at 01:17:55PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Anyway, the problem is sk/dash-is-previous, specifically fc5684b47 > > (revision.c: args starting with "-" might be a revision, 2017-02-25). It > > looks like the revision parser used to

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-31 Thread Junio C Hamano
Jeff King writes: > Anyway, the problem is sk/dash-is-previous, specifically fc5684b47 > (revision.c: args starting with "-" might be a revision, 2017-02-25). It > looks like the revision parser used to just bail on "-h", because > revision.c would say "I don't recognize this" and

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Junio C Hamano
Jeff King writes: > And the idea is that ranges like "-.." should work. TBH, I'm not sure > how I feel about that, for exactly the reason that came up here: it > makes it hard to syntactically differentiate the "-" shorthand from > actual options. We do have @{-1} already for this

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Jeff King
[+cc Siddharth, so quoting copiously] On Tue, May 30, 2017 at 11:27:56AM -0400, Jeff King wrote: > > Travis seems to be seeing the same failure. Curiously, the topic by > > itself passes for me; iow, pu fails, pu^2 doesn't fail. > > > > git.git/pu$ ./git rev-list -h > > BUG:

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Jeff King
On Tue, May 30, 2017 at 10:23:54PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Nope, I have those patches directly on your e83352ef23, and it passes. I > > wonder if there's something funny between our environments. What does > > the failure look like for you? > >

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Junio C Hamano
Jeff King writes: > Nope, I have those patches directly on your e83352ef23, and it passes. I > wonder if there's something funny between our environments. What does > the failure look like for you? Travis seems to be seeing the same failure. Curiously, the topic by itself passes

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Jeff King
On Tue, May 30, 2017 at 03:08:25PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > On Tue, May 30, 2017 at 03:03:18PM +0900, Junio C Hamano wrote: > > > >> > +test_expect_success 'generate builtin list' ' > >> > +git --list-builtins >builtins > >> > +' > >> > + >

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Junio C Hamano
Jeff King writes: > On Tue, May 30, 2017 at 03:03:18PM +0900, Junio C Hamano wrote: > >> > +test_expect_success 'generate builtin list' ' >> > + git --list-builtins >builtins >> > +' >> > + >> > +while read builtin >> > +do >> > + test_expect_success "$builtin can handle -h" '

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Jeff King
On Tue, May 30, 2017 at 03:03:18PM +0900, Junio C Hamano wrote: > > +test_expect_success 'generate builtin list' ' > > + git --list-builtins >builtins > > +' > > + > > +while read builtin > > +do > > + test_expect_success "$builtin can handle -h" ' > > + test_expect_code 129 git

Re: [PATCH 8/8] t0012: test "-h" with builtins

2017-05-30 Thread Junio C Hamano
Jeff King writes: > This patch just tests that "git foo -h" works for every > builtin, where we see a 129 exit code (the normal code for > our usage() helper), and that the word "usage" appears in > the output. > > Signed-off-by: Jeff King > --- > t/t0012-help.sh