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 902cb5b commit 9c88bfeCopy full SHA for 9c88bfe
setup.c
@@ -1786,10 +1786,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1786
break;
1787
case GIT_DIR_INVALID_OWNERSHIP:
1788
if (!nongit_ok) {
1789
+ struct strbuf prequoted = STRBUF_INIT;
1790
struct strbuf quoted = STRBUF_INIT;
1791
1792
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1793
+
1794
+#ifdef __MINGW32__
1795
+ if (dir.buf[0] == '/')
1796
+ strbuf_addstr(&prequoted, "%(prefix)/");
1797
+#endif
1798
1799
+ strbuf_add(&prequoted, dir.buf, dir.len);
1800
+ sq_quote_buf_pretty("ed, prequoted.buf);
1801
1802
die(_("detected dubious ownership in repository at '%s'\n"
1803
"%s"
1804
"To add an exception for this directory, call:\n"
0 commit comments