Jeff King wrote:
> --- a/environment.c
> +++ b/environment.c
> @@ -194,6 +194,7 @@ void set_git_work_tree(const char *new_work_tree)
> }
> git_work_tree_initialized = 1;
> work_tree = xstrdup(real_path(new_work_tree));
> + setenv(GIT_WORK_TREE_ENVIRONMENT, work_tree, 1);
> }
If we end up in a sub-process where GIT_WORK_TREE is not set
but GIT_DIR is, we assume the current directory is the root
of the working tree. Since future patches will change that
assumption, let's defensively start setting GIT_WORK_TREE
explicitly.
Signed-off-by: Jeff King
---
I didn't test this
2 matches
Mail list logo