Community
Participate
Working Groups
There are already multiple issues, first a quote from the git docs: ----- https://git-scm.com/docs/git-config --global For writing options: write to global ~/.gitconfig file rather than the repository .git/config, write to $XDG_CONFIG_HOME/git/config file if this file exists and the ~/.gitconfig file doesn’t. For reading options: read only from global ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files. --system For writing options: write to system-wide $(prefix)/etc/gitconfig rather than the repository .git/config. For reading options: read only from system-wide $(prefix)/etc/gitconfig rather than from all available files. ----- Now onto the issues: - $XDG_CONFIG_HOME/git/config is not read by JGit - $XDG_CONFIG_HOME/git/config is never written to by JGit - On Windows, the system configuration `%ProgramFiles%\Git\etc\gitconfig` is never used Which then results in missing/wrong configuration.
*** Bug 430194 has been marked as a duplicate of this bug. ***
https://git.eclipse.org/r/c/jgit/jgit/+/203248 merged as a2f326b76200c8def03eb136811c2cb5bc304f89
To clarify: that change solves respecting $XDG_CONFIG_HOME/git/config. About the system config on Windows: if git.exe is on the %PATH%, it should be used. (JGit uses the native git to detect where the system config is. If JGit cannot find the git executable, it also cannot find the system config.)