Subject: Re: [DONOTAPPLY PATCH 1/3] environment: set GIT_WORK_TREE when we figure out work tree

From: Jonathan Nieder <[email-masked]>
Date: Tue, 26 Mar 2013 13:16:43 -0700

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);
>  }

There's no rush, but I think this is a good change.  It makes the rest
of the codebase more resilient to running commands from a subdir of
the top level of the worktree.