mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-22 14:20:10 -05:00
setup: properly use "%(prefix)/" when in WSL
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
This commit is contained in:
committed by
Johannes Schindelin
parent
21253166b5
commit
407d577771
11
setup.c
11
setup.c
@@ -1506,10 +1506,19 @@ const char *setup_git_directory_gently(int *nongit_ok)
|
|||||||
break;
|
break;
|
||||||
case GIT_DIR_INVALID_OWNERSHIP:
|
case GIT_DIR_INVALID_OWNERSHIP:
|
||||||
if (!nongit_ok) {
|
if (!nongit_ok) {
|
||||||
|
struct strbuf prequoted = STRBUF_INIT;
|
||||||
struct strbuf quoted = STRBUF_INIT;
|
struct strbuf quoted = STRBUF_INIT;
|
||||||
|
|
||||||
strbuf_complete(&report, '\n');
|
strbuf_complete(&report, '\n');
|
||||||
sq_quote_buf_pretty("ed, dir.buf);
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
if (dir.buf[0] == '/')
|
||||||
|
strbuf_addstr(&prequoted, "%(prefix)/");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
strbuf_add(&prequoted, dir.buf, dir.len);
|
||||||
|
sq_quote_buf_pretty("ed, prequoted.buf);
|
||||||
|
|
||||||
die(_("detected dubious ownership in repository at '%s'\n"
|
die(_("detected dubious ownership in repository at '%s'\n"
|
||||||
"%s"
|
"%s"
|
||||||
"To add an exception for this directory, call:\n"
|
"To add an exception for this directory, call:\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user