diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2013-09-24 23:29:00 -0700 |
---|---|---|
committer | Jonathan Nieder <jrnieder@gmail.com> | 2013-09-24 23:29:00 -0700 |
commit | 7f794aab3eb84fedf1240c845976cab1c566c716 (patch) | |
tree | 9790ca68355e0981ea201a912bb68dfe40ebb368 /t | |
parent | Merge branch 'jc/strcasecmp-pure-inline' (diff) | |
parent | shortlog: ignore commits with missing authors (diff) | |
download | tgif-7f794aab3eb84fedf1240c845976cab1c566c716.tar.xz |
Merge branch 'jk/shortlog-tolerate-broken-commit'
* jk/shortlog-tolerate-broken-commit:
shortlog: ignore commits with missing authors
Diffstat (limited to 't')
-rwxr-xr-x | t/t4201-shortlog.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index 5493500ef1..42866992cf 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -172,4 +172,20 @@ test_expect_success 'shortlog encoding' ' git shortlog HEAD~2.. > out && test_cmp expect out' +test_expect_success 'shortlog ignores commits with missing authors' ' + git commit --allow-empty -m normal && + git commit --allow-empty -m soon-to-be-broken && + git cat-file commit HEAD >commit.tmp && + sed "/^author/d" commit.tmp >broken.tmp && + commit=$(git hash-object -w -t commit --stdin <broken.tmp) && + git update-ref HEAD $commit && + cat >expect <<-\EOF && + A U Thor (1): + normal + + EOF + git shortlog HEAD~2.. >actual && + test_cmp expect actual +' + test_done |