You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mingw: prepare for making git config --system do what users expect
This moves the system config into a more logical location: the `mingw64`
part of `C:\Program Files\Git\mingw64\etc\gitconfig` never made sense,
as it is a mere implementation detail. Let's skip the `mingw64` part and
move this to `C:\Program Files\Git\etc\gitconfig`.
Side note: in the rare (and not recommended) case a user chooses to
install 32-bit Git for Windows on a 64-bit system, the path will of
course be `C:\Program Files (x86)\Git\etc\gitconfig`.
The next step after this patch is to scrap support for
`C:\ProgramData\Git\config`, which never really made sense to users, and
which is inconsistent with non-Windows versions of Git, anyway.
Background: During the Git for Windows v1.x days, the system config was
located at `C:\Program Files (x86)\Git\etc\gitconfig`. With Git for
Windows v2.x, it moved to `C:\Program Files\Git\mingw64\gitconfig` (or
`C:\Program Files (x86)\Git\mingw32\gitconfig`).
Obviously, this new location was not stable (because of the "mingw64"
part) and this maintainer thought that it was a splendid time to
introduce a "super-system" config, with a constant location, that would
be shared by all Git implementations. Hence `C:\ProgramData\Git\config`
was born.
What we *should* have done instead is to move the location to the
top-level `etc` directory instead of the `mingw64\etc` one (or
`mingw32\etc` for 32-bit versions).
Likewise, we should have treated the system `gitattributes` in a similar
manner.
This patch makes it so.
Obviously, we are cautious to do this only for the known install
locations `/mingw64` and `/mingw32`; If anybody wants to override that
while building their version of Git (e.g. via `make prefix=$HOME`), we
leave the default location of the system config and gitattributes alone.
Signed-off-by: Johannes Schindelin <[email protected]>
0 commit comments