Re: [PATCH] interpret-trailers: load default config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 19, 2019 at 07:24:10AM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > Subject: [PATCH] interpret-trailers: load default config
> >
> > The interpret-trailers program does not do the usual loading of config
> > via git_default_config(), and thus does not respect many of the usual
> > options. In particular, we will not load core.commentChar, even though
> > the underlying trailer code tries to do so.
> 
> "tries to use it"?  Eh, it does use it, so, "the underlying trailer code
> uses its value", would be the correct version of the last sentence.

Heh. Well, it does use the C variable, just not the one from the config.
:) But yeah, if you want to clarify the text while you apply, I'm fine
with that.

> The underlying trailer.c has two calls to git_config() to lazy-load
> its own set of config variables (which is justified, as its caller
> is not necessarily the "interpret-trailers" subcommand), but their
> callbacks are not good places to call git_default_config() from for
> obvious reasons.  It has to be done in "interpret-trailers" (and
> other callers of the machinery should already have learned what
> core.commentChar is with their own configuration calls) like the
> patch I am reviewing does.

Yeah, I didn't look too carefully into the loading that the trailer code
does for the reasons you gave. Thanks for laying it out clearly (and I
wouldn't mind if you stuck that in the commit message either).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux