t6050: use test_line_count instead of wc -l

This modernizes a test and makes it more portable. Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed Mar 31, 2019 at 15:46 UTC 502d87b9e3ee6faadae45d545e0e257ef8948f0b
1 file changed +4 -2
t/t6050-replace.sh
+4 -2
@@ -393,9 +393,11 @@ test_expect_success 'replace ref cleanup' '
393 '
394
395 test_expect_success '--graft with and without already replaced object' '
396 - test $(git log --oneline | wc -l) = 7 &&
396 + git log --oneline >log &&
397 + test_line_count = 7 log &&
398 git replace --graft $HASH5 &&
398 - test $(git log --oneline | wc -l) = 3 &&
399 + git log --oneline >log &&
400 + test_line_count = 3 log &&
401 commit_has_parents $HASH5 &&
402 test_must_fail git replace --graft $HASH5 $HASH4 $HASH3 &&
403 git replace --force -g $HASH5 $HASH4 $HASH3 &&