We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd2ade2 commit ab47777Copy full SHA for ab47777
setup.c
@@ -1494,10 +1494,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1494
break;
1495
case GIT_DIR_INVALID_OWNERSHIP:
1496
if (!nongit_ok) {
1497
+ struct strbuf prequoted = STRBUF_INIT;
1498
struct strbuf quoted = STRBUF_INIT;
1499
1500
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1501
+
1502
+#ifdef __MINGW32__
1503
+ if (dir.buf[0] == '/')
1504
+ strbuf_addstr(&prequoted, "%(prefix)/");
1505
+#endif
1506
1507
+ strbuf_add(&prequoted, dir.buf, dir.len);
1508
+ sq_quote_buf_pretty("ed, prequoted.buf);
1509
1510
die(_("detected dubious ownership in repository at '%s'\n"
1511
"%s"
1512
"To add an exception for this directory, call:\n"
0 commit comments