Commit 768f423 1 parent 787bfe4 commit 768f423 Copy full SHA for 768f423
File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1482,10 +1482,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1482
1482
break ;
1483
1483
case GIT_DIR_INVALID_OWNERSHIP :
1484
1484
if (!nongit_ok ) {
1485
+ struct strbuf prequoted = STRBUF_INIT ;
1485
1486
struct strbuf quoted = STRBUF_INIT ;
1486
1487
1487
1488
strbuf_complete (& report , '\n' );
1488
- sq_quote_buf_pretty (& quoted , dir .buf );
1489
+
1490
+ #ifdef __MINGW32__
1491
+ if (dir .buf [0 ] == '/' )
1492
+ strbuf_addstr (& prequoted , "%(prefix)/" );
1493
+ #endif
1494
+
1495
+ strbuf_add (& prequoted , dir .buf , dir .len );
1496
+ sq_quote_buf_pretty (& quoted , prequoted .buf );
1497
+
1489
1498
die (_ ("detected dubious ownership in repository at '%s'\n"
1490
1499
"%s"
1491
1500
"To add an exception for this directory, call:\n"
You can’t perform that action at this time.
0 commit comments