From b5ca549c932a2818869dba7cc7c60a8ec5946a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 5 Jan 2021 20:42:34 +0100 Subject: mktag tests: use "test_commit" helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/t3800-mktag.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh index 0e411e3c45..dd21a1247a 100755 --- a/t/t3800-mktag.sh +++ b/t/t3800-mktag.sh @@ -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) ' -- cgit v1.2.3