Re: [PATCH] Allow setting default diff options via diff.defaultOptions
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:35
Hi, On Thu, 2 Apr 2009, Keith Cascio wrote:
On Sat, 21 Mar 2009, Johannes Schindelin wrote:quoted
The idea is from Keith Cascio. Signed-off-by: Johannes Schindelin <redacted> --- I do not particularly like what this patch does, but I like the non-intrusiveness and conciseness of it.Your patch does not provide a command line opt_out flag. Let me describe a workflow situation and ask you how to handle it if the user were running your patch. Let diff.defaultOptions = "-b". The user is getting closer to submitting his patch and he wants to see patch output identical to what `git format-patch` will produce. What command should he use? `git format-patch --stdout master` ?
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. In the case of format-patch, though, I am pretty certain that I do not want any diff.defaultOptions: the output is almost always intended for machine consumption, so it is a different kind of cattle. Now, it is easy to put a patch on top of my patch to support something like --no-defaults. Of course, to keep things simple, this has to be a separate patch. Ciao, Dscho