Skip to content

Commit 4089da9

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Drop the old-style runtime-prefix handling in interpolate_path() (#4389)
Once upon a time, Git for Windows had the need to specify paths in the config that are relative to the runtime prefix (i.e. relative to the location where Git for Windows happens to be installed). To support that, special handling was introduced to treat paths starting with a forward slash as relative to the runtime prefix. When trying to upstream this feature, it was determined that it is not portable enough, and it was deprecated in favor of the new strategy: starting paths with `%(prefix)/` would indicate that they are relative to the runtime prefix. After deprecating the "leading slash means relative to runtime prefix" feature in v2.34.0 (released November 15th, 2021), it is time to drop it. This reverts commit 28fdfd8 and addresses #4125, at long last.
2 parents 1bc2d50 + c1c5fa0 commit 4089da9

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

path.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,6 @@ char *interpolate_path(const char *path, int real_home)
745745
if (skip_prefix(path, "%(prefix)/", &path))
746746
return system_path(path);
747747

748-
#ifdef __MINGW32__
749-
if (path[0] == '/') {
750-
warning(_("encountered old-style '%s' that should be '%%(prefix)/%s'"), path, path);
751-
return system_path(path + 1);
752-
}
753-
#endif
754748
if (path[0] == '~') {
755749
const char *first_slash = strchrnul(path, '/');
756750
const char *username = path + 1;

0 commit comments

Comments
 (0)