Skip to content

Commit edc8f71

Browse files
hashplinggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d417c24 commit edc8f71

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

contrib/subtree/t/t7900-subtree.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ test_expect_success 'check hash of split' '
221221
spl1=$(git subtree split --prefix subdir) &&
222222
git subtree split --prefix subdir --branch splitbr1test &&
223223
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) &&
227225
check_equal ''"$new_hash"'' "$subdir_hash"
228226
'
229227

0 commit comments

Comments
 (0)