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 c71be29 commit 1023670Copy full SHA for 1023670
setup.c
@@ -1671,10 +1671,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1671
break;
1672
case GIT_DIR_INVALID_OWNERSHIP:
1673
if (!nongit_ok) {
1674
+ struct strbuf prequoted = STRBUF_INIT;
1675
struct strbuf quoted = STRBUF_INIT;
1676
1677
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1678
+
1679
+#ifdef __MINGW32__
1680
+ if (dir.buf[0] == '/')
1681
+ strbuf_addstr(&prequoted, "%(prefix)/");
1682
+#endif
1683
1684
+ strbuf_add(&prequoted, dir.buf, dir.len);
1685
+ sq_quote_buf_pretty("ed, prequoted.buf);
1686
1687
die(_("detected dubious ownership in repository at '%s'\n"
1688
"%s"
1689
"To add an exception for this directory, call:\n"
0 commit comments