Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-20 Thread Junio C Hamano
Charles Bailey writes: > On Fri, Jun 19, 2015 at 10:58:51AM -0700, Junio C Hamano wrote: > >> Eh, make that two: >> >> * We no longer say what value we did not like. The user presumably >>knows what he typed, so this is only a minor loss. >> >> * We used to stop without giving "usage", a

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-20 Thread Charles Bailey
On Fri, Jun 19, 2015 at 10:58:51AM -0700, Junio C Hamano wrote: > Charles Bailey writes: > > Please place it immediately after INTEGER, as they are conceptually > siblings---group similar things together. Sorry, this is a bad habit from working on projects where changing the value of existing en

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-20 Thread Jakub Narębski
W dniu 2015-06-19 o 20:39, Junio C Hamano pisze: > Junio C Hamano writes: > >> Except for the minor nits above, I think this is a good change. > > Oh, I forgot to mention one thing. I am not sure if this should be > called ULONG. "unsigned long"-ness is not the most important part > of this th

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-19 Thread Jakub Narębski
W dniu 2015-06-19 o 19:58, Junio C Hamano pisze: > Charles Bailey writes: [...] >> +if (!git_parse_ulong(arg, opt->value)) >> +return opterror(opt, "expects a numerical value", >> flags); > > This used to be: > >> -die(_("unable to parse value '%s' f

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-19 Thread Junio C Hamano
Junio C Hamano writes: > Except for the minor nits above, I think this is a good change. Oh, I forgot to mention one thing. I am not sure if this should be called ULONG. "unsigned long"-ness is not the most important part of this thing from the end-user's point of view, and also from the point

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-19 Thread Junio C Hamano
Charles Bailey writes: > diff --git a/parse-options.h b/parse-options.h > index c71e9da..2ddb26f 100644 > --- a/parse-options.h > +++ b/parse-options.h > @@ -18,7 +18,8 @@ enum parse_opt_type { > OPTION_INTEGER, > OPTION_CALLBACK, > OPTION_LOWLEVEL_CALLBACK, > - OPTION_FILEN

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-19 Thread Charles Bailey
On Fri, Jun 19, 2015 at 01:03:25PM +0200, Remi Galan Alfonso wrote: > > It's trivial matter but the line: > > + > output 2> output.err && > should be written: > > + >output 2>output.err && > > It was incorrectly written before but since > you are modifying the line, it might be a > good thing t

Re: [PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-19 Thread Remi Galan Alfonso
Charles Bailey writes: > test_expect_success 'long options' ' > - test-parse-options --boolean --integer 1729 --boolean --string2=321 \ > - --verbose --verbose --no-dry-run --abbrev=10 --file fi.le\ > - --obsolete > output 2> output.err && > + test-parse-options --boolean --integer 1729 --unsigned

[PATCH 2/3] Move unsigned long option parsing out of pack-objects.c

2015-06-19 Thread Charles Bailey
From: Charles Bailey The unsigned long option parsing (including 'k'/'m'/'g' suffix parsing) is more widely applicable. Add support for OPT_ULONG to parse-options.h and change pack-objects.c use this support. Signed-off-by: Charles Bailey --- builtin/pack-objects.c | 17 - pa