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