From dff2813391d720e1739d1d83a84ba38b1d4ad615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 6 Aug 2017 23:38:50 +0000 Subject: tests: don't give unportable ">" to "test" built-in, use -gt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change an argument to test_line_count (which'll ultimately be turned into a "test" expression) to use "-gt" instead of ">" for an arithmetic test. This broken on e.g. OpenBSD as of v2.13.0 with my commit ac3f5a3468 ("ref-filter: add --no-contains option to tag/branch/for-each-ref", 2017-03-24). Downstream just worked around it by patching git and didn't tell us about it, I discovered this when reading various Git packaging implementations: https://github.com/openbsd/ports/commit/7e48bf88a20 Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 6143113..c6791cf 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1889,7 +1889,7 @@ EOF" run_with_limited_stack git tag --contains HEAD >actual && test_cmp expect actual && run_with_limited_stack git tag --no-contains HEAD >actual && - test_line_count ">" 10 actual + test_line_count "-gt" 10 actual ' test_expect_success '--format should list tags as per format given' ' -- cgit v0.10.2-6-g49f6