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 3088b34 commit 1c37c54Copy full SHA for 1c37c54
setup.c
@@ -1506,10 +1506,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
1506
break;
1507
case GIT_DIR_INVALID_OWNERSHIP:
1508
if (!nongit_ok) {
1509
+ struct strbuf prequoted = STRBUF_INIT;
1510
struct strbuf quoted = STRBUF_INIT;
1511
1512
strbuf_complete(&report, '\n');
- sq_quote_buf_pretty("ed, dir.buf);
1513
+
1514
+#ifdef __MINGW32__
1515
+ if (dir.buf[0] == '/')
1516
+ strbuf_addstr(&prequoted, "%(prefix)/");
1517
+#endif
1518
1519
+ strbuf_add(&prequoted, dir.buf, dir.len);
1520
+ sq_quote_buf_pretty("ed, prequoted.buf);
1521
1522
die(_("detected dubious ownership in repository at '%s'\n"
1523
"%s"
1524
"To add an exception for this directory, call:\n"
0 commit comments