diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-04-14 01:28:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-14 01:28:50 +0300 |
commit | f63add4aa8e8c2ea413fe2bf3b5c9b0f55617e8b (patch) | |
tree | 438da5de939da18d89f81e84f9ea55e4f8957981 /t/t6300-for-each-ref.sh | |
parent | 89b43f80a514aee58b662ad606e6352e03eaeee4 (diff) | |
parent | c6854508808dd32e3fc20c5b021c4064d25f6438 (diff) |
Merge branch 'jk/ref-filter-segfault-fix'
A NULL-dereference bug has been corrected in an error codepath in
"git for-each-ref", "git branch --list" etc.
* jk/ref-filter-segfault-fix:
ref-filter: fix NULL check for parse object failure
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-x | t/t6300-for-each-ref.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index cac7f443d0..2e7c32d50c 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -1134,4 +1134,14 @@ test_expect_success 'for-each-ref --ignore-case works on multiple sort keys' ' test_cmp expect actual ' +test_expect_success 'for-each-ref reports broken tags' ' + git tag -m "good tag" broken-tag-good HEAD && + git cat-file tag broken-tag-good >good && + sed s/commit/blob/ <good >bad && + bad=$(git hash-object -w -t tag bad) && + git update-ref refs/tags/broken-tag-bad $bad && + test_must_fail git for-each-ref --format="%(*objectname)" \ + refs/tags/broken-tag-* +' + test_done |