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 f305fce commit 68d6bceCopy full SHA for 68d6bce
setup.c
@@ -1483,10 +1483,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1483
break;
1484
case GIT_DIR_INVALID_OWNERSHIP:
1485
if (!nongit_ok) {
1486
+ struct strbuf prequoted = STRBUF_INIT;
1487
struct strbuf quoted = STRBUF_INIT;
1488
1489
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1490
+
1491
+#ifdef __MINGW32__
1492
+ if (dir.buf[0] == '/')
1493
+ strbuf_addstr(&prequoted, "%(prefix)/");
1494
+#endif
1495
1496
+ strbuf_add(&prequoted, dir.buf, dir.len);
1497
+ sq_quote_buf_pretty("ed, prequoted.buf);
1498
1499
die(_("detected dubious ownership in repository at '%s'\n"
1500
"%s"
1501
"To add an exception for this directory, call:\n"
0 commit comments