Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-01-12 23:18:00 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-13 01:04:41 +0300
commitf5d79bf7dd6996b96009ac63b350aa047f2d9959 (patch)
tree90f3d3f39a2e48de0390a6fc8aea45b11c57d13e /t/t7810-grep.sh
parent3373518cc8bd0916581ccfd4a2ee9682d61a8874 (diff)
tests: refactor a few tests to use "test_commit --append"
Refactor a few more tests to use the new "--append" option to "test_commit". I added it for use in the mailmap tests, but this demonstrates how useful it is in general. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7810-grep.sh')
-rwxr-xr-xt/t7810-grep.sh18
1 files changed, 3 insertions, 15 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index 991d5bd9c0..312e0f8cb4 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -687,21 +687,9 @@ test_expect_success 'grep -C1 hunk mark between files' '
'
test_expect_success 'log grep setup' '
- echo a >>file &&
- test_tick &&
- GIT_AUTHOR_NAME="With * Asterisk" \
- GIT_AUTHOR_EMAIL="xyzzy@frotz.com" \
- git commit -a -m "second" &&
-
- echo a >>file &&
- test_tick &&
- git commit -a -m "third" &&
-
- echo a >>file &&
- test_tick &&
- GIT_AUTHOR_NAME="Night Fall" \
- GIT_AUTHOR_EMAIL="nitfol@frobozz.com" \
- git commit -a -m "fourth"
+ test_commit --append --author "With * Asterisk <xyzzy@frotz.com>" second file a &&
+ test_commit --append third file a &&
+ test_commit --append --author "Night Fall <nitfol@frobozz.com>" fourth file a
'
test_expect_success 'log grep (1)' '