aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCharles Bailey <cbailey32@bloomberg.net>2015-06-22 14:53:30 +0100
committerJunio C Hamano <gitster@pobox.com>2015-06-22 15:30:00 -0700
commitedc8f710c74b82391e21b91abf7c418934b056a3 (patch)
tree933215734f4a2f2babb45e31505844a7eafec17c /contrib
parentd417c244ec72f7300478fce035c5e49bfdc07537 (diff)
downloadgit-edc8f710c74b82391e21b91abf7c418934b056a3.tar.gz
git-edc8f710c74b82391e21b91abf7c418934b056a3.tar.xz
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 <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 001c604dd..bd3df9793 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"
'