Re: [PATCH v8 03/12] Move lower case functions into wrapper.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 28, 2014, 17:12 UTC
- Message-ID
- <xmqqzjkab634.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20140327225658.GC32434@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> But I also do not overly care. Literally zero people have complained > that "[log]date = RFC822" is not accepted, so it is probably not a big > deal either way.
That is most likely because we do not advertise these enum values spelled in random cases in our documentation and people do not even attempt to upcase the examples they see. So you are right to say that it does not hurt anybody in practice if the code does not strcasecmp() input from them. We do not know if using strcasecmp() there and allowing them to feed the enums spelled in random cases would invite confusions in the longer run, so let's not risk it. There is no upside in using strcasecmp() here.
By the way, that is "rfc2822"---do we want "rfc822" as its synonym as well as "rfc", I wonder ;-)