X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=git-filter-branch.sh;h=ccceaf19a74373bb23b2a2b1aa71b7f0bb909d54;hb=aea8879a6ac54dd3bc552812061130d0ff451cc2;hp=64f21547c1ab99ef3ad98d57fe0fbadff9621838;hpb=0657e0f802b0e0a97738c074dd27ee47eeb3366f;p=thirdparty%2Fgit.git diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 64f21547c1..ccceaf19a7 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -11,6 +11,8 @@ # The following functions will also be available in the commit filter: functions=$(cat << \EOF +EMPTY_TREE=$(git hash-object -t tree /dev/null) + warn () { echo "$*" >&2 } @@ -46,7 +48,7 @@ git_commit_non_empty_tree() { if test $# = 3 && test "$1" = $(git rev-parse "$3^{tree}"); then map "$3" - elif test $# = 1 && test "$1" = 4b825dc642cb6eb9a060e54bf8d69288fbee4904; then + elif test $# = 1 && test "$1" = $EMPTY_TREE; then : else git commit-tree "$@"