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