Skip to content

Commit 03f4082

Browse files
peffgitster
authored andcommitted
shortlog: test and document --committer option
This puts the final touches on the feature added by fbfda15 (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>
1 parent fbfda15 commit 03f4082

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Documentation/git-shortlog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ OPTIONS
4747

4848
Each pretty-printed commit will be rewrapped before it is shown.
4949

50+
-c::
51+
--committer::
52+
Collect and show committer identities instead of authors.
53+
5054
-w[<width>[,<indent1>[,<indent2>]]]::
5155
Linewrap the output by wrapping each line at `width`. The first
5256
line of each entry is indented by `indent1` spaces, and the second

t/t4201-shortlog.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,17 @@ test_expect_success 'shortlog with --output=<file>' '
190190
test_line_count = 3 shortlog
191191
'
192192

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+
193206
test_done

0 commit comments

Comments
 (0)