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