diff options
Diffstat (limited to 't/t6120-describe.sh')
-rwxr-xr-x | t/t6120-describe.sh | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index bae2419150..9781b92aed 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -262,7 +262,7 @@ test_expect_success 'name-rev --all' ' >expect.unsorted && for rev in $(git rev-list --all) do - git name-rev $rev >>expect.unsorted + git name-rev $rev >>expect.unsorted || return 1 done && sort <expect.unsorted >expect && git name-rev --all >actual.unsorted && @@ -270,19 +270,24 @@ test_expect_success 'name-rev --all' ' test_cmp expect actual ' -test_expect_success 'name-rev --stdin' ' +test_expect_success 'name-rev --annotate-stdin' ' >expect.unsorted && for rev in $(git rev-list --all) do name=$(git name-rev --name-only $rev) && - echo "$rev ($name)" >>expect.unsorted + echo "$rev ($name)" >>expect.unsorted || return 1 done && sort <expect.unsorted >expect && - git rev-list --all | git name-rev --stdin >actual.unsorted && + git rev-list --all | git name-rev --annotate-stdin >actual.unsorted && sort <actual.unsorted >actual && test_cmp expect actual ' +test_expect_success 'name-rev --stdin deprecated' " + git rev-list --all | git name-rev --stdin 2>actual && + grep -E 'warning: --stdin is deprecated' actual +" + test_expect_success 'describe --contains with the exact tags' ' echo "A^0" >expect && tag_object=$(git rev-parse refs/tags/A) && @@ -390,9 +395,12 @@ test_expect_success ULIMIT_STACK_SIZE 'name-rev works in a deep repo' ' committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200 data <<EOF commit #$i -EOF" - test $i = 1 && echo "from refs/heads/main^0" - i=$(($i + 1)) +EOF" && + if test $i = 1 + then + echo "from refs/heads/main^0" + fi && + i=$(($i + 1)) || return 1 done | git fast-import && git checkout main && git tag far-far-away HEAD^ && |