From 999cfc4f45e90a2eafa9b170d0ab9f0f13cbddb8 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Tue, 12 Jan 2021 21:17:58 +0100 Subject: test-lib functions: add --author support to test_commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for --author to "test_commit". This will simplify some current and future tests, one of those is being changed here. Let's also line-wrap the "git commit" command invocation to make diffs that add subsequent options easier to add, as they'll only need to add a new option line. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- t/t7509-commit-authorship.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 't/t7509-commit-authorship.sh') diff --git a/t/t7509-commit-authorship.sh b/t/t7509-commit-authorship.sh index 500ab2fe72..ee6c47416e 100755 --- a/t/t7509-commit-authorship.sh +++ b/t/t7509-commit-authorship.sh @@ -18,11 +18,8 @@ message_body () { } test_expect_success '-C option copies authorship and message' ' - echo "Initial" >foo && - git add foo && - test_tick && - git commit -m "Initial Commit" --author Frigate\ \ && - git tag Initial && + test_commit --author Frigate\ \ \ + "Initial Commit" foo Initial Initial && echo "Test 1" >>foo && test_tick && git commit -a -C Initial && -- cgit v1.2.3