Re: [PATCH 10/20] diff-parseopt: convert --[no-]abbrev

2019-03-20 Thread Duy Nguyen
On Thu, Mar 21, 2019 at 6:00 AM Ævar Arnfjörð Bjarmason wrote: > > > On Wed, Mar 20 2019, Nguyễn Thái Ngọc Duy wrote: > > > [...]And the '40' change is self explanatory. > > Let me make an attempt at being dense anyway... > > > - else if (v > 40) > > - v = 40; > > +

Re: [PATCH 10/20] diff-parseopt: convert --[no-]abbrev

2019-03-20 Thread Ævar Arnfjörð Bjarmason
On Wed, Mar 20 2019, Nguyễn Thái Ngọc Duy wrote: > [...]And the '40' change is self explanatory. Let me make an attempt at being dense anyway... > - else if (v > 40) > - v = 40; > + else if (v > the_hash_algo->hexsz) > + v = the_h

[PATCH 10/20] diff-parseopt: convert --[no-]abbrev

2019-03-20 Thread Nguyễn Thái Ngọc Duy
OPT__ABBREV() has the same behavior as the deleted code with one difference: it does check for valid number and error out if not. And the '40' change is self explanatory. Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 12 +--- parse-options-cb.c | 4 ++-- 2 files changed,