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

2013-03-26 Thread Jonathan Nieder
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); > }

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

2013-03-26 Thread Jeff King
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