git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christian Couder <christian.couder@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	git <git@vger.kernel.org>,
	masahiroy@kernel.org
Subject: Re: [PATCH] interpret-trailers: load default config
Date: Wed, 19 Jun 2019 13:47:52 -0400	[thread overview]
Message-ID: <20190619174752.GA27834@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqwohhr6ut.fsf@gitster-ct.c.googlers.com>

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

> Jeff King <peff@peff.net> 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

  reply	other threads:[~2019-06-19 17:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 11:35 'git interpret-trailers' is tripped by comment characters other than '#' Masahiro Yamada
2019-06-14 15:07 ` Jeff King
2019-06-15  8:41   ` Christian Couder
2019-06-17  4:32     ` Masahiro Yamada
2019-06-17  5:03       ` Christian Couder
2019-06-17 17:31         ` Junio C Hamano
2019-06-17 20:07           ` Christian Couder
2019-06-18  2:41             ` Masahiro Yamada
2019-06-19  3:37     ` [PATCH] interpret-trailers: load default config Jeff King
2019-06-19 14:24       ` Junio C Hamano
2019-06-19 17:47         ` Jeff King [this message]
2019-06-19 15:52       ` Masahiro Yamada
2019-06-17  4:32   ` 'git interpret-trailers' is tripped by comment characters other than '#' Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190619174752.GA27834@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=masahiroy@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).