Windows: add a configuration location to be shared among different Git implementations #148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Windows, there is no
/etc/
. As such, there is no "system config" per se.In Git for Windows, we have (of course) the "system config", but it is buried in a location that is rather specific to Git for Windows:
C:\Program Files\Git\mingw64\etc\gitconfig
(and for 32-bit versions, it is different, as well as for Git for Windows <2.x).Earlier, libgit2 tried to share this system config with Git for Windows, but that's not really an elegant thing to do: if Git for Windows is uninstalled, that system config is gone, for example.
So together with the libgit2 project, we came up with the idea of a "Windows-wide" config, and the most logical location with which we could come up was
C:\ProgramData\Git\config
.This patch adds support for that location, and other Git implementations are encouraged to use it instead of Git for Windows' "system-wide" config.