Re: [PATCH] Allow setting default diff options via diff.defaultOptions
- From
Jeff King <peff@peff.net>
- Date
- Apr 9, 2009, 08:49 UTC
- Message-ID
- <20090409084903.GA18947@coredump.intra.peff.net>
- In-Reply-To
- <alpine.DEB.1.00.0904091030030.10279@pacific.mpi-cbg.de>
On Thu, Apr 09, 2009 at 10:45:40AM +0200, Johannes Schindelin wrote:
> The proper way would be to have options to _undo_ every diff option, I > guess, as this would also help aliases in addition to defaultOptions.
I agree with this sentiment, no matter which approach is taken. I am more like to say "take my usual defaults, but tweak this one thing" than to say "turn off all of my defaults".
> Now, it is easy to put a patch on top of my patch to support something > like --no-defaults.
No, it's not. We went over this in great detail earlier in the thread. If you want:
git diff --no-defaults
then you basically have to parse twice to avoid the chicken-and-egg problem. Which is why I suggested:
git --no-defaults diff
which does work. Keith's solution does allow "git diff --no-defaults".
-Peff