mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-28 15:45:21 -05:00
fixup! mingw: handle absolute paths in expand_user_path()
This drops Git for Windows' version in preparation for merging the version that made it upstream, followed by reinstating the now-deprecated handling of a leading slash on Windows. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
5
path.c
5
path.c
@@ -12,7 +12,6 @@
|
||||
#include "packfile.h"
|
||||
#include "object-store.h"
|
||||
#include "lockfile.h"
|
||||
#include "exec-cmd.h"
|
||||
|
||||
static int get_st_mode_bits(const char *path, int *mode)
|
||||
{
|
||||
@@ -733,10 +732,6 @@ char *expand_user_path(const char *path, int real_home)
|
||||
|
||||
if (path == NULL)
|
||||
goto return_null;
|
||||
#ifdef __MINGW32__
|
||||
if (path[0] == '/')
|
||||
return system_path(path + 1);
|
||||
#endif
|
||||
if (path[0] == '~') {
|
||||
const char *first_slash = strchrnul(path, '/');
|
||||
const char *username = path + 1;
|
||||
|
||||
Reference in New Issue
Block a user