Re: [PATCH v3 1/2] difftool: add a skeleton for the upcoming builtin
- From
Jeff King <peff@peff.net>
- Date
- Nov 25, 2016, 17:47 UTC
- Message-ID
- <20161125174721.f35mzc276kdwakzm@sigill.intra.peff.net>
- In-Reply-To
- <alpine.DEB.2.20.1611251841030.117539@virtualbox>
On Fri, Nov 25, 2016 at 06:41:23PM +0100, Johannes Schindelin wrote:
Show 7 quoted lines
> > Ah, I didn't realize that was a requirement. If this is going to be part > > of a release and real end-users are going to see it, that does make me > > think the config option is the better path (than the presence of some > > file), as it's our standard way of tweaking run-time behavior. > > So how do you easily switch back and forth between testing the old vs the > new difftool via the test suite?
If it's for a specific tool, I'd consider teaching the test suite to run the whole script twice: once with the flag set and once without.
That is sometimes more complicated, though, if the script creates many sub-repos. An environment variable might be more natural. If you already support flipping the default via config, you can probably do:
GIT_CONFIG_PARAMETERS="'difftool.usebuiltin=true'" export GIT_CONFIG_PARAMETERS
-Peff