Skip to content

Commit dff2813

Browse files
avargitster
authored andcommitted
tests: don't give unportable ">" to "test" built-in, use -gt
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 ac3f5a3 ("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: openbsd/ports@7e48bf88a20 Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 80f4cd8 commit dff2813

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7004-tag.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ EOF"
18891889
run_with_limited_stack git tag --contains HEAD >actual &&
18901890
test_cmp expect actual &&
18911891
run_with_limited_stack git tag --no-contains HEAD >actual &&
1892-
test_line_count ">" 10 actual
1892+
test_line_count "-gt" 10 actual
18931893
'
18941894

18951895
test_expect_success '--format should list tags as per format given' '

0 commit comments

Comments
 (0)