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

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

 



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.

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.

Looks perfect.  Thanks.

> This can be seen in the accompanying test, where setting
> core.commentChar to anything besides "#" results in a failure to treat
> the comments correctly.
>
> Reported-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---

>  builtin/interpret-trailers.c  |  3 ++
>  t/t7513-interpret-trailers.sh | 70 +++++++++++++++++++++--------------
>  2 files changed, 46 insertions(+), 27 deletions(-)




[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