Skip to content

Commit

Permalink
Remove support for XP specific config location
Browse files Browse the repository at this point in the history
Current Git for Windows supports an additional configuration location
for system setting. On contemporary versionws of Windows this is
$PROGRAMDATA/Git/config. But XP does not know about $PRORGRAMDATA so
$ALLUSERSPROFILE/Application Data/Git/config was used.

XP itself is EOL for quite some time and Git for Windows ceased to
support it officially with version 2.10.0 (release 3 Sep 2016).

https://github.com/git-for-windows/git/wiki/FAQ#which-versions-of-windows-are-supported
https://git-for-windows.github.io/requirements.html

Signed-off-by: Andreas Heiduk <[email protected]>
  • Loading branch information
asheiduk authored and dscho committed Oct 17, 2017
1 parent 95006ba commit dd780a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Documentation/git-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ config file (located at `$PROGRAMDATA/Git/config`), intended to contain
settings for *all* Git-related software running on the machine. Consequently,
this config file takes an even lower precedence than the
`$(prefix)/etc/gitconfig` file. Typically `$PROGRAMDATA` points to
`C:\ProgramData` (on Windows XP the equivalent in `$ALLUSERSPROFILE` is used,
i.e. `C:\Documents and Settings\All Users\Application Data\Git\config`).
`C:\ProgramData`.

If no further options are given, all reading options will read all of these
files that are available. If the global or the system-wide configuration
Expand Down
7 changes: 1 addition & 6 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3269,13 +3269,8 @@ const char *program_data_config(void)

if (!initialized) {
const char *env = mingw_getenv("PROGRAMDATA");
const char *extra = "";
if (!env) {
env = mingw_getenv("ALLUSERSPROFILE");
extra = "/Application Data";
}
if (env)
strbuf_addf(&path, "%s%s/Git/config", env, extra);
strbuf_addf(&path, "%s/Git/config", env);
initialized = 1;
}
return *path.buf ? path.buf : NULL;
Expand Down

0 comments on commit dd780a2

Please sign in to comment.