File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1479,6 +1479,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
1479
1479
break ;
1480
1480
case GIT_DIR_INVALID_OWNERSHIP :
1481
1481
if (!nongit_ok ) {
1482
+ struct strbuf prequoted = STRBUF_INIT ;
1482
1483
struct strbuf quoted = STRBUF_INIT ;
1483
1484
struct strbuf hint = STRBUF_INIT ;
1484
1485
@@ -1491,7 +1492,14 @@ const char *setup_git_directory_gently(int *nongit_ok)
1491
1492
"again for more information." ));
1492
1493
#endif
1493
1494
1494
- sq_quote_buf_pretty (& quoted , dir .buf );
1495
+ #ifdef __MINGW32__
1496
+ if (dir .buf [0 ] == '/' )
1497
+ strbuf_addstr (& prequoted , "%(prefix)/" );
1498
+ #endif
1499
+
1500
+ strbuf_add (& prequoted , dir .buf , dir .len );
1501
+ sq_quote_buf_pretty (& quoted , prequoted .buf );
1502
+
1495
1503
die (_ ("detected dubious ownership in repository at '%s'\n"
1496
1504
"To add an exception for this directory, call:\n"
1497
1505
"\n"
You can’t perform that action at this time.
0 commit comments