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 f675455 commit e20ac05Copy full SHA for e20ac05
setup.c
@@ -1479,9 +1479,17 @@ const char *setup_git_directory_gently(int *nongit_ok)
1479
break;
1480
case GIT_DIR_INVALID_OWNERSHIP:
1481
if (!nongit_ok) {
1482
+ struct strbuf prequoted = STRBUF_INIT;
1483
struct strbuf quoted = STRBUF_INIT;
1484
- sq_quote_buf_pretty("ed, dir.buf);
1485
+#ifdef __MINGW32__
1486
+ if (dir.buf[0] == '/')
1487
+ strbuf_addstr(&prequoted, "%(prefix)/");
1488
+#endif
1489
+
1490
+ strbuf_add(&prequoted, dir.buf, dir.len);
1491
+ sq_quote_buf_pretty("ed, prequoted.buf);
1492
1493
die(_("detected dubious ownership in repository at '%s'\n"
1494
"To add an exception for this directory, call:\n"
1495
"\n"
0 commit comments