Skip to content

Commit be3c6a7

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 282c5d2 + 0b52bfb commit be3c6a7

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
@@ -746,12 +746,6 @@ char *interpolate_path(const char *path, int real_home)
746746
if (skip_prefix(path, "%(prefix)/", &path))
747747
return system_path(path);
748748

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

0 commit comments

Comments
 (0)