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 1c61ce1 commit 8afd3eaCopy full SHA for 8afd3ea
setup.c
@@ -1573,10 +1573,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1573
break;
1574
case GIT_DIR_INVALID_OWNERSHIP:
1575
if (!nongit_ok) {
1576
+ struct strbuf prequoted = STRBUF_INIT;
1577
struct strbuf quoted = STRBUF_INIT;
1578
1579
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1580
+
1581
+#ifdef __MINGW32__
1582
+ if (dir.buf[0] == '/')
1583
+ strbuf_addstr(&prequoted, "%(prefix)/");
1584
+#endif
1585
1586
+ strbuf_add(&prequoted, dir.buf, dir.len);
1587
+ sq_quote_buf_pretty("ed, prequoted.buf);
1588
1589
die(_("detected dubious ownership in repository at '%s'\n"
1590
"%s"
1591
"To add an exception for this directory, call:\n"
0 commit comments