summaryrefslogtreecommitdiff
path: root/t/t1403-show-ref.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-05-10 16:19:04 +0200
committerJunio C Hamano <gitster@pobox.com>2021-05-11 12:45:18 +0900
commit6cf8d96fa28668a62f05be5b276739c03c514581 (patch)
tree487c734f1e02715f4ff425658874975f35ecfdff /t/t1403-show-ref.sh
parent5144219b7d7aeac9290cbee5a7425763bd253667 (diff)
downloadgit-6cf8d96fa28668a62f05be5b276739c03c514581.tar.gz
test-lib functions: add an --annotated option to "test_commit"
Add an --annotated option to test_commit to create annotated tags. The tag will share the same message as the commit, and we'll call test_tick before creating it (unless --notick) is provided. There's quite a few tests that could be simplified with this construct. I've picked one to convert in this change as a demonstration. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1403-show-ref.sh')
-rwxr-xr-xt/t1403-show-ref.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh
index 6ce62f878c..17d3cc1405 100755
--- a/t/t1403-show-ref.sh
+++ b/t/t1403-show-ref.sh
@@ -7,11 +7,9 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
test_expect_success setup '
- test_commit A &&
- git tag -f -a -m "annotated A" A &&
+ test_commit --annotate A &&
git checkout -b side &&
- test_commit B &&
- git tag -f -a -m "annotated B" B &&
+ test_commit --annotate B &&
git checkout main &&
test_commit C &&
git branch B A^0