зеркало из https://github.com/microsoft/git.git
truncate cwd string before printing error message
Without this truncation the error message printed only shows the cwd from the start of the search, not where it failed. Signed-off-by: Lars R. Damerow <lars@pixar.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
0ef37164c2
Коммит
502ffe3491
4
setup.c
4
setup.c
|
@ -422,9 +422,11 @@ const char *setup_git_directory_gently(int *nongit_ok)
|
||||||
}
|
}
|
||||||
die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
|
die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
|
||||||
}
|
}
|
||||||
if (chdir(".."))
|
if (chdir("..")) {
|
||||||
|
cwd[offset] = '\0';
|
||||||
die_errno("Cannot change to '%s/..'", cwd);
|
die_errno("Cannot change to '%s/..'", cwd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inside_git_dir = 0;
|
inside_git_dir = 0;
|
||||||
if (!work_tree_env)
|
if (!work_tree_env)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче