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 17567e5 commit ebfff8fCopy full SHA for ebfff8f
setup.c
@@ -1879,10 +1879,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1879
break;
1880
case GIT_DIR_INVALID_OWNERSHIP:
1881
if (!nongit_ok) {
1882
+ struct strbuf prequoted = STRBUF_INIT;
1883
struct strbuf quoted = STRBUF_INIT;
1884
1885
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1886
+
1887
+#ifdef __MINGW32__
1888
+ if (dir.buf[0] == '/')
1889
+ strbuf_addstr(&prequoted, "%(prefix)/");
1890
+#endif
1891
1892
+ strbuf_add(&prequoted, dir.buf, dir.len);
1893
+ sq_quote_buf_pretty("ed, prequoted.buf);
1894
1895
die(_("detected dubious ownership in repository at '%s'\n"
1896
"%s"
1897
"To add an exception for this directory, call:\n"
0 commit comments