Re: [PATCH] Add the diff option --no-defaults
- From
Jeff King <peff@peff.net>
- Date
- Apr 17, 2009, 11:54 UTC
- Message-ID
- <20090417115414.GA29121@coredump.intra.peff.net>
- In-Reply-To
- <7v4owok0bh.fsf@gitster.siamese.dyndns.org>
On Thu, Apr 16, 2009 at 09:52:50AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> > Right now, I think we are safe. A few options like "--default" do take a > > separated string argument, but saying "--default --no-defaults" seems a > > little crazy to me (besides being confusing because they are talking > > about two totally unrelated defaults). > > Maybe you guys have already considered and discarded this as too hacky, > but isn't it the easiest to explain and code to declare --no-defaults is > acceptable only at the beginning?
I discarded that as "too hacky". If I had to choose my poison between "insane string options don't work" and "option must inexplicably be at the front", I think I take the former. It is perhaps a more difficult rule to realize you are triggering, but it is much less likely to come up in practice.
But I think all of this is just ending up in the same place that Keith and I arrived at much earlier in the thread: you _are_ choosing a poison, and his patch was meant to avoid that. The question is whether the added code complexity is worth it.
-Peff