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 2c4d077 commit 133293aCopy full SHA for 133293a
setup.c
@@ -1551,10 +1551,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1551
break;
1552
case GIT_DIR_INVALID_OWNERSHIP:
1553
if (!nongit_ok) {
1554
+ struct strbuf prequoted = STRBUF_INIT;
1555
struct strbuf quoted = STRBUF_INIT;
1556
1557
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1558
+
1559
+#ifdef __MINGW32__
1560
+ if (dir.buf[0] == '/')
1561
+ strbuf_addstr(&prequoted, "%(prefix)/");
1562
+#endif
1563
1564
+ strbuf_add(&prequoted, dir.buf, dir.len);
1565
+ sq_quote_buf_pretty("ed, prequoted.buf);
1566
1567
die(_("detected dubious ownership in repository at '%s'\n"
1568
"%s"
1569
"To add an exception for this directory, call:\n"
0 commit comments