shortlog: test and document --committer option
authorJeff King <peff@peff.net>
Fri, 16 Dec 2016 13:51:41 +0000 (08:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Dec 2016 17:39:10 +0000 (09:39 -0800)
This puts the final touches on the feature added by
fbfda15fb8 (shortlog: group by committer information,
2016-10-11).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-shortlog.txt
t/t4201-shortlog.sh
index 31af7f27360d277ccdc3e5bd59b4788c83934b8e..ee6c5476c1d2bf3b2a708e6152ebaba5882cc4f7 100644 (file)
@@ -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[<width>[,<indent1>[,<indent2>]]]::
        Linewrap the output by wrapping each line at `width`.  The first
        line of each entry is indented by `indent1` spaces, and the second
index ae08b57712e382a4cba7f7a51a499b4621a38c84..6c7c6374812a76b38f7073c487980266c1cfe38e 100755 (executable)
@@ -190,4 +190,17 @@ test_expect_success 'shortlog with --output=<file>' '
        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