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