]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mktag tests: use "test_commit" helper
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 5 Jan 2021 19:42:34 +0000 (20:42 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Jan 2021 22:58:28 +0000 (14:58 -0800)
Replace ad-hoc setup of a single commit in the "mktag" tests with our
standard helper pattern. The old setup dated back to 446c6faec69 (New
tests and en-passant modifications to mktag., 2006-07-29) before the
helper existed.

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

index 0e411e3c45fa46d604f7efad0f45e5799d36013e..dd21a1247a23b86c2f433604ab31afcd16342a03 100755 (executable)
@@ -23,9 +23,7 @@ check_verify_failure () {
 # first create a commit, so we have a valid object/type
 # for the tag.
 test_expect_success 'setup' '
-       echo Hello >A &&
-       git update-index --add A &&
-       git commit -m "Initial commit" &&
+       test_commit A &&
        head=$(git rev-parse --verify HEAD)
 '