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 676736f commit 0084602Copy full SHA for 0084602
setup.c
@@ -1383,9 +1383,17 @@ const char *setup_git_directory_gently(int *nongit_ok)
1383
break;
1384
case GIT_DIR_INVALID_OWNERSHIP:
1385
if (!nongit_ok) {
1386
+ struct strbuf prequoted = STRBUF_INIT;
1387
struct strbuf quoted = STRBUF_INIT;
1388
- sq_quote_buf_pretty("ed, dir.buf);
1389
+#ifdef __MINGW32__
1390
+ if (dir.buf[0] == '/')
1391
+ strbuf_addstr(&prequoted, "%(prefix)/");
1392
+#endif
1393
+
1394
+ strbuf_add(&prequoted, dir.buf, dir.len);
1395
+ sq_quote_buf_pretty("ed, prequoted.buf);
1396
1397
die(_("unsafe repository ('%s' is owned by someone else)\n"
1398
"To add an exception for this directory, call:\n"
1399
"\n"
0 commit comments