Don't export GIT_WORK_TREE.
authorJames McCoy <vega.james@gmail.com>
Fri, 18 Nov 2011 03:03:05 +0000 (22:03 -0500)
committerJames McCoy <vega.james@gmail.com>
Fri, 18 Nov 2011 03:03:05 +0000 (22:03 -0500)
Since GIT_DIR is set and the config has core.worktree set, exporting
GIT_WORK_TREE in login/execin is unnecessary.  Also, having it exported can
cause other git commands to fail.

Signed-off-by: James McCoy <vega.james@gmail.com>
movein

diff --git a/movein b/movein
index 04905c1..10658ba 100755 (executable)
--- a/movein
+++ b/movein
@@ -176,7 +176,6 @@ login() {
     fi
 
     export GIT_DIR="$LOCAL_REPOS/${1}.git"
-    export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)"
 
     GIT_PS1_SHOWUNTRACKEDFILES= PSMOVEIN="movein:${1}" $SHELL -i || :
 }
@@ -190,7 +189,6 @@ execin() {
     REPO=$1;shift
 
     export GIT_DIR="$LOCAL_REPOS/${REPO}.git"
-    export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)"
 
     "$@"
 }