diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index ca4df5be83..c3bd2a58b9 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -63,7 +63,7 @@ test_create_pre2_32_repo () { git -C "$1" log -1 --format=%B HEAD^2 >msg && test_commit -C "$1-sub" --annotate sub2 && git clone --no-local "$1" "$1-clone" && - new_commit=$(cat msg | sed -e "s/$commit/$tag/" | git -C "$1-clone" commit-tree HEAD^2^{tree}) && + new_commit=$(sed -e "s/$commit/$tag/" msg | git -C "$1-clone" commit-tree HEAD^2^{tree}) && git -C "$1-clone" replace HEAD^2 $new_commit }