Skip to content

Commit d24813c

Browse files
ijcgitster
authored andcommitted
filter-branch: reset $GIT_* before cleaning up
This is pure code motion to enable a subsequent patch to add code which needs to happen with the reset $GIT_* but before the temporary directory has been cleaned up. Signed-off-by: Ian Campbell <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 94c9fd2 commit d24813c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git-filter-branch.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,6 @@ if [ "$filter_tag_name" ]; then
544544
done
545545
fi
546546

547-
cd "$orig_dir"
548-
rm -rf "$tempdir"
549-
550-
trap - 0
551-
552547
unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE
553548
test -z "$ORIG_GIT_DIR" || {
554549
GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR
@@ -562,6 +557,11 @@ test -z "$ORIG_GIT_INDEX_FILE" || {
562557
export GIT_INDEX_FILE
563558
}
564559

560+
cd "$orig_dir"
561+
rm -rf "$tempdir"
562+
563+
trap - 0
564+
565565
if [ "$(is_bare_repository)" = false ]; then
566566
git read-tree -u -m HEAD || exit
567567
fi

0 commit comments

Comments
 (0)