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