summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-02-24 23:34:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-25 00:24:25 (GMT)
commit74ae14199dfb4b3b22a10d3dcecb62b457245564 (patch)
tree8f0a05d56b2d818bb31563a8ffd70abe4e54aca0 /diff-lib.c
parent7d750f0ea511dcc26c3c9de996a9b75444366ecc (diff)
downloadgit-74ae14199dfb4b3b22a10d3dcecb62b457245564.zip
git-74ae14199dfb4b3b22a10d3dcecb62b457245564.tar.gz
git-74ae14199dfb4b3b22a10d3dcecb62b457245564.tar.bz2
submodules: ensure clean environment when operating in a submodule
git-submodule used to take care of clearing GIT_DIR whenever it operated on a submodule index or configuration, but forgot to unset GIT_WORK_TREE or other repo-local variables. This would lead to failures e.g. when GIT_WORK_TREE was set. This only happened in very unusual contexts such as operating on the main worktree from outside of it, but since "git-gui: set GIT_DIR and GIT_WORK_TREE after setup" (a9fa11fe5bd5978bb) such failures could also be provoked by invoking an external tool such as "git submodule update" from the Git Gui in a standard setup. Solve by using the newly introduced clear_local_git_env() shell function to ensure that all repo-local environment variables are unset. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
0 files changed, 0 insertions, 0 deletions