git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Fwd: Q: use '-C' flag with 'git config --global'

From
Jeff King <peff@peff.net>
Date
Apr 6, 2020, 18:05 UTC
Message-ID
<20200406180508.GA23427@coredump.intra.peff.net>
In-Reply-To
<xmqq4ktwwl1g.fsf@gitster.c.googlers.com>
On Mon, Apr 06, 2020 at 11:01:31AM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> > There's another difference when asking to read from a specific file:
> > includes are not turned on by default. Try
> >
> >   git -C ... config --global --includes user.email
> >
> > This is covered briefly in git-config(1):
> >
> >   --[no-]includes
> >     Respect include.* directives in config files when looking up values.
> >     Defaults to off when a specific file is given (e.g., using --file,
> >     --global, etc) and on when searching all config files.
> >
> > This can be confusing, but was necessary to keep compatibility with
> > scripted manipulations of those files when includes were introduced.
> 
> So, in short, the mention of -C in the report was red herring and it
> was all about --(system|global|local)?

Yes. It's relevant insofar as being in the repo to trigger the conditional include, but "cd" would also have sufficed for that. :)

-Peff
Previous: Junio C Hamano
Message 4 of 4 in “Fwd: Q: use '-C' flag with 'git config --global'”
  1. Tomáš ProcházkaApr 6, 2020
  2. Jeff KingApr 6, 2020
  3. Junio C HamanoApr 6, 2020
  4. Jeff KingApr 6, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.