]> git.ipfire.org Git - thirdparty/git.git/commit
describe tests: refactor away from glob matching
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 12 Apr 2021 11:21:44 +0000 (13:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 May 2021 03:48:09 +0000 (12:48 +0900)
commita46a84829650fbe6077e5a33f4ac1c9d2041d1df
tree2b22a5ff08e98bdabb9a586aa391d6d4ea692155
parent2df546e17fa1c28ac44c886f59ba39ea2f00124a
describe tests: refactor away from glob matching

Change the glob matching via a "case" statement to a "test_cmp" after
we've stripped out the hash-specific g<hash-abbrev>
suffix. 5312ab11fbf (Add describe test., 2007-01-13).

This means that we can use test_cmp to compare the output. I could
omit the "-8" change of e.g. "A-*" to "A-8-gHASH", but I think it
makes sense to test that here explicitly. It means you need to add new
tests to the bottom of the file, but that's not a burden in this case.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6120-describe.sh