From b7787b93ce4a9e1ad280b4b0d43c60b951948227 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 11:51:06 -1000 Subject: Test the branch and tag labels in the log No test anywhere drew a label, so the peel that tells an annotated tag from a lightweight one had no check. --- tests/t0103-log.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index 8cab0f5..6284684 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -85,6 +85,21 @@ test_expect_success 'a search matching nothing says so' ' test_grep ! "No commits match" tmp ' +# A tag's label says which kind it is, which only peeling the tag tells, and +# a branch label leads to that branch's log. +test_expect_success 'the log labels branches and both kinds of tag' ' + mkrepo repos/deco 3 && + git -C repos/deco branch side HEAD~1 && + git -C repos/deco tag deco-light HEAD~1 && + git -C repos/deco tag -a -m annotated deco-annotated HEAD~2 && + cgitrc_repo decorc deco && + cgit_ok decorc "url=deco/log/" >tmp && + test_grep "master" tmp && + test_grep "side" tmp && + test_grep "deco-light" tmp && + test_grep "deco-annotated" tmp +' + # Following a file diffs each commit for the name the file had there, so the # root commit that created it has to be diffed too, and paging has to go on # asking about the name the visitor followed rather than the older one. -- cgit 2.12.1