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 e137f27 commit 16d77e2Copy full SHA for 16d77e2
setup.c
@@ -1432,9 +1432,17 @@ const char *setup_git_directory_gently(int *nongit_ok)
1432
break;
1433
case GIT_DIR_INVALID_OWNERSHIP:
1434
if (!nongit_ok) {
1435
+ struct strbuf prequoted = STRBUF_INIT;
1436
struct strbuf quoted = STRBUF_INIT;
1437
- sq_quote_buf_pretty("ed, dir.buf);
1438
+#ifdef __MINGW32__
1439
+ if (dir.buf[0] == '/')
1440
+ strbuf_addstr(&prequoted, "%(prefix)/");
1441
+#endif
1442
+
1443
+ strbuf_add(&prequoted, dir.buf, dir.len);
1444
+ sq_quote_buf_pretty("ed, prequoted.buf);
1445
1446
die(_("detected dubious ownership in repository at '%s'\n"
1447
"To add an exception for this directory, call:\n"
1448
"\n"
0 commit comments