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

Re: sharp edges in Git configuration files

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 31, 2026, 17:26 UTC
Message-ID
<auYk201o4foYWl2d@fruit.crustytoothpaste.net>
In-Reply-To
<CAPx1Gvd3rAcgDf-rBPOuZFf2=Y+=JxJDdr6AJTvdtpL6Vsk43w@mail.gmail.com>
On 2026-10-31 at 02:56:44, Chris Torek wrote:
Show 6 quoted lines
> The obvious thing with "doctor it hurts when I do this" is of course
> "well don't do that", and nobody should be splitting their .git/config
> into multiple included sub-config-files. But, in the spirit of robust
> software (and perhaps just as leftover bits?), it might be wise to
> make Git ignore include lines in config files that are intended to be
> Git-managed directly, such as .git/config.

I actually believe we're using includes for `.git/config` in some cases at work and I'm pretty sure my colleagues do want them to continue to work.

I don't know exactly why they're doing that, since I'm not intimately involved with that project, but I will point out that our fork of Git has a checksum that includes the `config` file (but not included files) and that must be in sync across replicas, so they may be doing so to test out a config setting on a particular host during development. In any event, I'd say that while it may seem bizarre, some people might want to do this for other reasons[0], so we probably shouldn't break it.

[0] One reason I can imagine is personal configuration (via `path=~/...`) in large shared repositories. Yes, people shouldn't be doing that, but we know they do.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Speaking for myself only
Previous: Chris Torek
Message 2 of 2 in “sharp edges in Git configuration files”
  1. Chris TorekOct 31, 2026
  2. brian m. carlsonOct 31, 2026

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.