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