Skip to content

Commit 93281f3

Browse files
derrickstoleedscho
authored andcommitted
Merge pull request #3790: Include trailing slash in prefix migration instructions
After attempting to add directory on a network share to the `safe.directory` configuration with, for example: ``` git config --global --add safe.directory //servername/repos/myrepo ``` The warning about an outdated path style: ``` warning: encountered old-style '//servername/repos/myrepo' that should be '%(prefix)//servername/repos/myrepo' ``` However, the warning is missing a trailing `/` behind the prefix. This PR fixes the warning such that the resulting configuration works. Also see https://stackoverflow.com/a/71859164/4473230 Closes #3786
2 parents 661e90d + e2821e2 commit 93281f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

path.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ char *interpolate_path(const char *path, int real_home)
741741

742742
#ifdef __MINGW32__
743743
if (path[0] == '/') {
744-
warning(_("encountered old-style '%s' that should be '%%(prefix)%s'"), path, path);
744+
warning(_("encountered old-style '%s' that should be '%%(prefix)/%s'"), path, path);
745745
return system_path(path + 1);
746746
}
747747
#endif

0 commit comments

Comments
 (0)