On Fri, Dec 20, 2019 at 4:32 PM Elijah Newren <newren@xxxxxxxxx> wrote: > > On Fri, Dec 20, 2019 at 1:29 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > > > "Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > > > > > +static long parse_empty_value(const char *value) > > > +{ > > > + if (!value) > > > + return EMPTY_UNSPECIFIED; > > > + else if (!strcasecmp(value, "drop")) > > > + return EMPTY_DROP; > > > + else if (!strcasecmp(value, "keep")) > > > + return EMPTY_KEEP; > > > + else if (!strcasecmp(value, "ask")) > > > + return EMPTY_ASK; > > > > Not an error but just silently ignored? > > Oops, I'll switch it to an error. By the way, diff.c's parse_algorithm_value() and diff_opt_diff_algorithm() behave the same way, where parse_algorithm_value() will return a negative value if it's not one of the valid known cases, and diff_opt_diff_algorithm() checks for negative and throws an error. Should I also modify those to put the error in parse_algorithm_value()? (Not part of this series, but as a consistency cleanup since it clearly surprised you and even I forgot that I had the calling function returning the error when I copied that style?)