Re: [PATCH v1 1/3] Introduce config variable "diff.primer"
- From
Jeff King <peff@peff.net>
- Date
- Jan 26, 2009, 11:06 UTC
- Message-ID
- <20090126110641.GA19993@coredump.intra.peff.net>
- In-Reply-To
- <alpine.DEB.1.00.0901261152320.14855@racer>
On Mon, Jan 26, 2009 at 11:54:26AM +0100, Johannes Schindelin wrote:
Show 10 quoted lines
> > So if you just want this from the command line, then I think it is safe > > to have "git diff" always respect "diff.primer", and scripts shouldn't > > be impacted. > > But as Keith made clear, he wanted to use it from _git-gui_. Which > -- naturally -- _has_ to use plumbing, to guarantee a stable interface. > > So "fixing" this in "git diff" is the wrong place; anything else than > teaching "git gui" to remember user-defined diff options and to use them > would be a complicator's glove.
I think what you are missing here is that he specifically mentioned the command line, and I was responding to those comments. There are two separate problems: default options for command line usage and the mechanism by which one can set options for things like git-gui.
In this case he was asking specifically about "git diff" from the command line, so fixing it in there _is_ the place to fix it (the only other alternative being to make a wrapper or alias).
For the other problem, it _may_ benefit from tool support that would help porcelains respect a "diff.primer" variable like Keith proposed. But that has already been discussed elsewhere in the thread, so I'm not going to repeat it here.
-Peff