Re: [PATCH] format-patch: introduce format.outputDirectory configuration
- From
Jeff King <peff@peff.net>
- Date
- Jun 18, 2015, 20:13 UTC
- Message-ID
- <20150618201323.GB14550@peff.net>
- In-Reply-To
- <xmqqk2v0eq75.fsf@gitster.dls.corp.google.com>
On Thu, Jun 18, 2015 at 01:06:54PM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> >> Don't we load the config before parsing options here? In that case, we > >> can use our usual strategy to just set output_directory (which is > >> already a static global) from the config callback, and everything Just > >> Works. > >> > >> We do have to bump the definition of output_directory up above the > >> config callback, like so (while we are here, we might also want to > >> drop the unnecessary static initializers, which violate our style guide): > > > > You would also need to remove the "oh you gave me -o twice?" check, > > and change the semantics to "later -o overrides an earlier one", > > wouldn't you? Otherwise you would never be able to override what > > you read from the config, I am afraid. > > By the way, I actually think "later -o overrides an earlier one" is > a good change by itself, regardless of this new configuration.
Ah, I didn't realize we did that. Yeah, I think we should switch to "later overrides earlier". There is no need for "-o" to behave completely differently than all of our other options.
-Peff