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

2.38 "protected configuration" ignores includes

From
Mantas Mikulėnas <grawity@gmail.com>
Date
Oct 12, 2022, 06:16 UTC
Message-ID
<CAPWNY8W_Tr-WoD-GXBddD5Y8w5Y4w+gDNYQdOAJ1uBwVHuRrsQ@mail.gmail.com>

After Git 2.38 (specifically after commit 6061601d9), git no longer honors safe.directory settings in files that are [include]'d from the main global configuration file, even though they are shown as being in global scope by `git config --show-scope --show-origin`.

The docs added by https://github.com/git/git/commit/779ea9303a7de3d618f3b0e329ebb89529ab3285 only talk about scopes and do not mention anything about [include] being specifically ignored.

$ git config --get-all --show-scope --show-origin safe.directory global file:/home/grawity/.config/git/config /srv/this.works global file:/home/grawity/.config/git/config.local /srv/this.does.not.work

# ~/.config/git/config (owned by grawity:users)
[safe]
    directory = /srv/this.works
[include]
    path = ~/.config/git/config.local
# ~/.config/git/config.local (also owned by grawity:users)
[safe]
    directory = /srv/this.does.not.work
-- 
Mantas Mikulėnas
Next: Glen Choo
Message 1 of 2 in “2.38 "protected configuration" ignores includes”
  1. Mantas MikulėnasOct 12, 2022
  2. Glen ChooOct 12, 2022

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.