summaryrefslogtreecommitdiff
path: root/t/t6120-describe.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-06-14 04:33:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-06-14 04:33:29 (GMT)
commit2019256717d70bcfa1c6cd3869cfdc02310adb7a (patch)
treea354a9651be896d3b088356b0a73fb280fb14df8 /t/t6120-describe.sh
parentc189dba20e6d94e4408bcc6ad298f0c157f05b43 (diff)
parentf0d4d398e281009bc5e34d830b37c0c1df2fb8a8 (diff)
downloadgit-2019256717d70bcfa1c6cd3869cfdc02310adb7a.zip
git-2019256717d70bcfa1c6cd3869cfdc02310adb7a.tar.gz
git-2019256717d70bcfa1c6cd3869cfdc02310adb7a.tar.bz2
Merge branch 'ab/test-lib-updates'
Test clean-up. * ab/test-lib-updates: test-lib: split up and deprecate test_create_repo() test-lib: do not show advice about init.defaultBranch under --verbose test-lib: reformat argument list in test_create_repo() submodule tests: use symbolic-ref --short to discover branch name test-lib functions: add --printf option to test_commit describe tests: convert setup to use test_commit test-lib functions: add an --annotated option to "test_commit" test-lib-functions: document test_commit --no-tag test-lib-functions: reword "test_commit --append" docs test-lib tests: remove dead GIT_TEST_FRAMEWORK_SELFTEST variable test-lib: bring $remove_trash out of retirement
Diffstat (limited to 't/t6120-describe.sh')
-rwxr-xr-xt/t6120-describe.sh58
1 files changed, 13 insertions, 45 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index e89b674..88fddc9 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -31,64 +31,32 @@ check_describe () {
}
test_expect_success setup '
+ test_commit initial file one &&
+ test_commit second file two &&
+ test_commit third file three &&
+ test_commit --annotate A file A &&
+ test_commit c file c &&
- test_tick &&
- echo one >file && git add file && git commit -m initial &&
- one=$(git rev-parse HEAD) &&
-
- git describe --always HEAD &&
-
- test_tick &&
- echo two >file && git add file && git commit -m second &&
- two=$(git rev-parse HEAD) &&
-
- test_tick &&
- echo three >file && git add file && git commit -m third &&
-
- test_tick &&
- echo A >file && git add file && git commit -m A &&
- test_tick &&
- git tag -a -m A A &&
-
- test_tick &&
- echo c >file && git add file && git commit -m c &&
- test_tick &&
- git tag c &&
-
- git reset --hard $two &&
- test_tick &&
- echo B >side && git add side && git commit -m B &&
- test_tick &&
- git tag -a -m B B &&
+ git reset --hard second &&
+ test_commit --annotate B side B &&
test_tick &&
git merge -m Merged c &&
merged=$(git rev-parse HEAD) &&
- git reset --hard $two &&
- test_tick &&
- echo D >another && git add another && git commit -m D &&
- test_tick &&
- git tag -a -m D D &&
- test_tick &&
- git tag -a -m R R &&
-
- test_tick &&
- echo DD >another && git commit -a -m another &&
+ git reset --hard second &&
+ test_commit --no-tag D another D &&
test_tick &&
- git tag e &&
+ git tag -a -m R R &&
- test_tick &&
- echo DDD >another && git commit -a -m "yet another" &&
+ test_commit e another DD &&
+ test_commit --no-tag "yet another" another DDD &&
test_tick &&
git merge -m Merged $merged &&
- test_tick &&
- echo X >file && echo X >side && git add file side &&
- git commit -m x
-
+ test_commit --no-tag x file
'
check_describe A-* HEAD