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 3f72192 commit 3903e5dCopy full SHA for 3903e5d
setup.c
@@ -1635,10 +1635,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1635
break;
1636
case GIT_DIR_INVALID_OWNERSHIP:
1637
if (!nongit_ok) {
1638
+ struct strbuf prequoted = STRBUF_INIT;
1639
struct strbuf quoted = STRBUF_INIT;
1640
1641
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1642
+
1643
+#ifdef __MINGW32__
1644
+ if (dir.buf[0] == '/')
1645
+ strbuf_addstr(&prequoted, "%(prefix)/");
1646
+#endif
1647
1648
+ strbuf_add(&prequoted, dir.buf, dir.len);
1649
+ sq_quote_buf_pretty("ed, prequoted.buf);
1650
1651
die(_("detected dubious ownership in repository at '%s'\n"
1652
"%s"
1653
"To add an exception for this directory, call:\n"
0 commit comments