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>
Charles Bailey committed
Jun 22, 2015 at 14:53 UTC
edc8f710c74b82391e21b91abf7c418934b056a3
1 file changed
+1
-3
contrib/subtree/t/t7900-subtree.sh
+1
-3
@@ -221,9 +221,7 @@ test_expect_success 'check hash of split' '
221
spl1=$(git subtree split --prefix subdir) &&
222
git subtree split --prefix subdir --branch splitbr1test &&
223
check_equal ''"$(git rev-parse splitbr1test)"'' "$spl1" &&
224
- git checkout splitbr1test &&
225
- new_hash=$(git rev-parse HEAD~2) &&
226
- git checkout mainline &&
224
+ new_hash=$(git rev-parse splitbr1test~2) &&
225
check_equal ''"$new_hash"'' "$subdir_hash"
226
'
227