filter-branch: always export GIT_DIR if it is set
[git/git.git] / git-filter-branch.sh
old mode 100755 (executable)
new mode 100644 (file)
index 9d61b7f..614f7bd
@@ -301,9 +301,10 @@ case "$GIT_DIR" in
 /*)
        ;;
 *)
-       export GIT_DIR="$(pwd)/../../$GIT_DIR"
+       GIT_DIR="$(pwd)/../../$GIT_DIR"
        ;;
 esac
+export GIT_DIR GIT_WORK_TREE=.
 
 export GIT_INDEX_FILE="$(pwd)/../index"
 git-read-tree # seed the index file