From: Charles Bailey Date: Mon, 22 Jun 2015 13:53:30 +0000 (+0100) Subject: contrib/subtree: small tidy-up to test X-Git-Tag: v2.5.0-rc2~17^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/edc8f710c74b82391e21b91abf7c418934b056a3 contrib/subtree: small tidy-up to test There's no need to switch branches to parse another branch's ancestry. Signed-off-by: Charles Bailey Signed-off-by: Junio C Hamano --- diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index 001c604dd1..bd3df97936 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -221,9 +221,7 @@ test_expect_success 'check hash of split' ' spl1=$(git subtree split --prefix subdir) && git subtree split --prefix subdir --branch splitbr1test && check_equal ''"$(git rev-parse splitbr1test)"'' "$spl1" && - git checkout splitbr1test && - new_hash=$(git rev-parse HEAD~2) && - git checkout mainline && + new_hash=$(git rev-parse splitbr1test~2) && check_equal ''"$new_hash"'' "$subdir_hash" '