describe tests: convert setup to use test_commit
commit8cfe386b78c15eff38388479aa2f9fae00a9cf53
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 10 May 2021 14:19:05 +0000 (10 16:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 May 2021 03:45:18 +0000 (11 12:45 +0900)
treee52b673bb69073d849b54a417835979942b975ae
parent6cf8d96fa28668a62f05be5b276739c03c514581
describe tests: convert setup to use test_commit

Convert the setup of the describe tests to use test_commit when
possible. This makes use of the new --annotate option to test_commit.

Some of the setup here could simply be removed since the data being
created wasn't important to any of the subsequent tests, so I've done
so. E.g. assigning to the "one" variable was always useless, and just
checking that we can describe HEAD after the first commit wasn't
useful.

In the case of the "two" variable we could instead use the tag we just
created. See 5312ab11fbf (Add describe test., 2007-01-13) for the
initial version of this code. There's other cases here like redundant
"test_tick" invocations, or the simplification of not echoing "X" to a
file we're about to tag as "x", now we just use "x" in both cases.

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