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 9ca77e6 commit e392645Copy full SHA for e392645
setup.c
@@ -1493,10 +1493,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1493
break;
1494
case GIT_DIR_INVALID_OWNERSHIP:
1495
if (!nongit_ok) {
1496
+ struct strbuf prequoted = STRBUF_INIT;
1497
struct strbuf quoted = STRBUF_INIT;
1498
1499
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1500
+
1501
+#ifdef __MINGW32__
1502
+ if (dir.buf[0] == '/')
1503
+ strbuf_addstr(&prequoted, "%(prefix)/");
1504
+#endif
1505
1506
+ strbuf_add(&prequoted, dir.buf, dir.len);
1507
+ sq_quote_buf_pretty("ed, prequoted.buf);
1508
1509
die(_("detected dubious ownership in repository at '%s'\n"
1510
"%s"
1511
"To add an exception for this directory, call:\n"
0 commit comments