Skip to content

Commit bc3743d

Browse files
authored
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 9e6cd4b + 8ee4161 commit bc3743d

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

742-
#ifdef __MINGW32__
743-
if (path[0] == '/') {
744-
warning(_("encountered old-style '%s' that should be '%%(prefix)/%s'"), path, path);
745-
return system_path(path + 1);
746-
}
747-
#endif
748742
if (path[0] == '~') {
749743
const char *first_slash = strchrnul(path, '/');
750744
const char *username = path + 1;

0 commit comments

Comments
 (0)