Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-20 Thread Junio C Hamano
Tobias Klauser writes: > On 2015-10-17 at 23:24:13 +0200, Junio C Hamano wrote: >> Before starting v3, please fetch from me and check what is queued on >> 'pu'. It may turn out that the fix-ups I did while queuing this >> round is sufficient, in which case you can just say that instead ;-) > >

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-20 Thread Tobias Klauser
On 2015-10-17 at 23:24:13 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > On 2015-10-16 at 19:29:35 +0200, Junio C Hamano wrote: > >> Junio C Hamano writes: > >> > >> >> - if (mode == INVAL) > >> >> - usage(usage_msg); > >> > > >> > When given "git stripspace -

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-17 Thread Junio C Hamano
Tobias Klauser writes: > On 2015-10-16 at 19:29:35 +0200, Junio C Hamano wrote: >> Junio C Hamano writes: >> >> >> - if (mode == INVAL) >> >> - usage(usage_msg); >> > >> > When given "git stripspace -s blorg", we used to set mode to INVAL >> > and then showed the correct usage. But we

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 19:07:34 +0200, Junio C Hamano wrote: > Tobias Klauser writes: > > > Use parse-options to parse command-line options instead of a > > hand-crafted implementation. > > > > This is a preparatory patch to simplify the introduction of the > > --count-lines option in a follow-up patc

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-17 Thread Tobias Klauser
On 2015-10-16 at 19:29:35 +0200, Junio C Hamano wrote: > Junio C Hamano writes: > > >> - if (mode == INVAL) > >> - usage(usage_msg); > > > > When given "git stripspace -s blorg", we used to set mode to INVAL > > and then showed the correct usage. But we no longer have a check > > that

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Junio C Hamano
Junio C Hamano writes: >> -if (mode == INVAL) >> -usage(usage_msg); > > When given "git stripspace -s blorg", we used to set mode to INVAL > and then showed the correct usage. But we no longer have a check > that corresponds to the old INVAL thing, do we? Perhaps check argc > to

Re: [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Junio C Hamano
Tobias Klauser writes: > Use parse-options to parse command-line options instead of a > hand-crafted implementation. > > This is a preparatory patch to simplify the introduction of the > --count-lines option in a follow-up patch. The second paragraph is probably of much lessor importance than on

[PATCH v2 2/4] stripspace: Use parse-options for command-line parsing

2015-10-16 Thread Tobias Klauser
Use parse-options to parse command-line options instead of a hand-crafted implementation. This is a preparatory patch to simplify the introduction of the --count-lines option in a follow-up patch. Signed-off-by: Tobias Klauser --- builtin/stripspace.c | 56 --