Re: [PATCH 1/5 v4] diff: parse detached options like -S foo
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Aug 2, 2010, 19:43 UTC
- Message-ID
- <vpqocdkdcms.fsf@bauges.imag.fr>
- In-Reply-To
- <7v62ztnesc.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Just a style thing, but I think "arg + 2" is much easier to read in this > particular case, as it won't risk tempting readers to go "Huh? What does > that 'c' mean"?
I'll take this "+ 2" in the next round.
> Do we have an option that can take a zero-length string as its value and
> do something meaningful? I don't think of any offhand ("log -S'' -p" is
> not it---it may be meaningful but it is not useful), but this code would
> start giving "-p" instead of "" to the option in such a case.I make it explicit in the commit message: only -S, -l and -O are touched by my change among the one-letter options => no problem here.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/