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

Possible bug in referenced configuration file loading

From
Raphael Stolt <raphael.stolt@gmail.com>
Date
Oct 26, 2018, 07:30 UTC
Message-ID
<CAM-9DY2KVjq2879TJUNhBsRBbAjScMS7U5scP-fAY0NsvCan9A@mail.gmail.com>
Configuration for global ignore patterns in ~/.config/git/config:
[core]
    excludesfile = .gitignore

doesn't get looked up per default in ~/.config/git/ which might be considered a bug as the .gitignore file isn't loaded. It's only loaded when .gitignore is located in $HOME or explicitly referenced via ~/.config/git/.gitignore.

Configuration for a conditional include also in ~/.config/git/config:
[includeIf "gitdir:~/Work/git-repos/"]
    path = .oss-gitconfig

does get looked up per default in ~/.config/git/ and therefor the .oss-gitconfig is loaded.

So there seems to be a difference in Git's configuration loading strategies.
Environment details:

macOS High Sierra git version 2.19.1

Windows 10 git version 2.16.1.windows.2

Next: Jeff King
Message 1 of 2 in “Possible bug in referenced configuration file loading”
  1. Raphael StoltOct 26, 2018
  2. Jeff KingOct 26, 2018

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.