Re: diff.defaultOptions implementation design [was diff.primer]
From: Keith Cascio <hidden>
Date: 2016-06-15 22:46:13
Peff, On Fri, 13 Feb 2009, Jeff King wrote:
So I think doing it right is a bit more work in the long run, but the extra work is generally improving git. All that being said, though, I still think we can do the equivalent of --no-primer. The trick to avoiding multiple passes is for the option to exist outside of the set of primer'd options.
I like the idea of using parse-options to handle diff options and I too would
like all switches negatable. I will come back to the other ideas you mention if
necessary. You laid it all out nicely.
Assuming we can do away with the switches --[no-]default-options, thereby
hopefully eliminating the need to accumulate options in any kind of fancy way,
certainly the right place to "walk" is in diff_setup(). But diff_setup() must
still ascertain at least one runtime fact: whether or not we are running one of
the commands that respects default options {diff, log, show}. Is there an
elegant way to ascertain that fact from inside diff_setup()? How do you
recommend? (BTW I believe my design achieves this elegantly).
-- Keith