From 9489d0f197185d584294aa99a09a1b3c5ebb25e0 Mon Sep 17 00:00:00 2001 From: Matthias Lederhofer Date: Wed, 6 Jun 2007 09:16:56 +0200 Subject: [PATCH] filter-branch: always export GIT_DIR if it is set Currently filter-branch exports GIT_DIR only if it is an relative path but git-sh-setup might also set GIT_DIR to an absolute path that is not exported yet. Additionally export GIT_WORK_TREE with GIT_DIR to ensure that cwd is used as working tree even for bare repositories. Signed-off-by: Matthias Lederhofer Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 git-filter-branch.sh diff --git a/git-filter-branch.sh b/git-filter-branch.sh old mode 100755 new mode 100644 index 9d61b7fff..614f7bd3c --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -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 -- 2.30.2