shortlog: test and document --committer option
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>
Jeff King committed
Dec 16, 2016 at 08:51 UTC
03f40829ad22deb7b6950cfc28a3779ece9e6a56
2 files changed
+17
Documentation/git-shortlog.txt
+4
@@ -47,6 +47,10 @@ OPTIONS
47
48
Each pretty-printed commit will be rewrapped before it is shown.
49
50
+-c::
51
+--committer::
52
+ Collect and show committer identities instead of authors.
53
+
54
-w[<width>[,<indent1>[,<indent2>]]]::
55
Linewrap the output by wrapping each line at `width`. The first
56
line of each entry is indented by `indent1` spaces, and the second
t/t4201-shortlog.sh
+13
@@ -190,4 +190,17 @@ test_expect_success 'shortlog with --output=<file>' '
190
test_line_count = 3 shortlog
191
'
192
193
+test_expect_success 'shortlog --committer (internal)' '
194
+ cat >expect <<-\EOF &&
195
+ 3 C O Mitter
196
+ EOF
197
+ git shortlog -nsc HEAD >actual &&
198
+ test_cmp expect actual
199
+'
200
+
201
+test_expect_success 'shortlog --committer (external)' '
202
+ git log --format=full | git shortlog -nsc >actual &&
203
+ test_cmp expect actual
204
+'
205
+
206
test_done