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 4c1ff5b commit 1d4de54Copy full SHA for 1d4de54
setup.c
@@ -1482,10 +1482,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1482
break;
1483
case GIT_DIR_INVALID_OWNERSHIP:
1484
if (!nongit_ok) {
1485
+ struct strbuf prequoted = STRBUF_INIT;
1486
struct strbuf quoted = STRBUF_INIT;
1487
1488
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, 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("ed, prequoted.buf);
1497
1498
die(_("detected dubious ownership in repository at '%s'\n"
1499
"%s"
1500
"To add an exception for this directory, call:\n"
0 commit comments