Skip to content

Commit

Permalink
Merge pull request #3790: Include trailing slash in prefix migration …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
derrickstolee authored and dscho committed Apr 26, 2022
2 parents f78acff + cf5d31b commit 750d507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion path.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ char *interpolate_path(const char *path, int real_home)

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

0 comments on commit 750d507

Please sign in to comment.