We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6ca5c1 commit b1d2feaCopy full SHA for b1d2fea
setup.c
@@ -1781,10 +1781,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1781
break;
1782
case GIT_DIR_INVALID_OWNERSHIP:
1783
if (!nongit_ok) {
1784
+ struct strbuf prequoted = STRBUF_INIT;
1785
struct strbuf quoted = STRBUF_INIT;
1786
1787
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1788
+
1789
+#ifdef __MINGW32__
1790
+ if (dir.buf[0] == '/')
1791
+ strbuf_addstr(&prequoted, "%(prefix)/");
1792
+#endif
1793
1794
+ strbuf_add(&prequoted, dir.buf, dir.len);
1795
+ sq_quote_buf_pretty("ed, prequoted.buf);
1796
1797
die(_("detected dubious ownership in repository at '%s'\n"
1798
"%s"
1799
"To add an exception for this directory, call:\n"
0 commit comments