diff options
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -369,6 +369,8 @@ static const char *setup_bare_git_dir(const char *work_tree_env, if (!work_tree_env) inside_work_tree = 0; if (offset != len) { + if (chdir(cwd)) + die_errno("Cannot come back to cwd"); root_len = offset_1st_component(cwd); cwd[offset > root_len ? offset : root_len] = '\0'; set_git_dir(cwd); |