Re: [PATCH] Allow setting default diff options via diff.defaultOptions
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 9, 2009, 08:45 UTC
- Message-ID
- <alpine.DEB.1.00.0904091030030.10279@pacific.mpi-cbg.de>
- In-Reply-To
- <alpine.GSO.2.00.0904021647120.16242@kiwi.cs.ucla.edu>
Hi,
On Thu, 2 Apr 2009, Keith Cascio wrote:
Show 16 quoted lines
> On Sat, 21 Mar 2009, Johannes Schindelin wrote: > > > The idea is from Keith Cascio. > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > > --- > > 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