diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index 31af7f2736..ee6c5476c1 100644 --- a/Documentation/git-shortlog.txt +++ b/Documentation/git-shortlog.txt @@ -47,6 +47,10 @@ OPTIONS Each pretty-printed commit will be rewrapped before it is shown. +-c:: +--committer:: + Collect and show committer identities instead of authors. + -w[[,[,]]]:: Linewrap the output by wrapping each line at `width`. The first line of each entry is indented by `indent1` spaces, and the second diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index ae08b57712..6c7c637481 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -190,4 +190,17 @@ test_expect_success 'shortlog with --output=' ' test_line_count = 3 shortlog ' +test_expect_success 'shortlog --committer (internal)' ' + cat >expect <<-\EOF && + 3 C O Mitter + EOF + git shortlog -nsc HEAD >actual && + test_cmp expect actual +' + +test_expect_success 'shortlog --committer (external)' ' + git log --format=full | git shortlog -nsc >actual && + test_cmp expect actual +' + test_done