summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-09-27 08:39:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-27 19:21:05 (GMT)
commit92338c450bc41e8e3da31a10d2ab73844e8b0634 (patch)
tree4efb1599c7d62617ea6a77bb413b2a9046f571c7 /Documentation
parent45d93eb82403a35d248d17dd0ea7dc3d690b1323 (diff)
downloadgit-92338c450bc41e8e3da31a10d2ab73844e8b0634.zip
git-92338c450bc41e8e3da31a10d2ab73844e8b0634.tar.gz
git-92338c450bc41e8e3da31a10d2ab73844e8b0634.tar.bz2
shortlog: add grouping option
In preparation for adding more grouping types, let's refactor the committer/author grouping code and add a user-facing option that binds them together. In particular: - the main option is now "--group", to make it clear that the various group types are mutually exclusive. The "--committer" option is an alias for "--group=committer". - we keep an enum rather than a binary flag, to prepare for more values - we prefer switch statements to ternary assignment, since other group types will need more custom code Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-shortlog.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
index a72ea7f..6496d31 100644
--- a/Documentation/git-shortlog.txt
+++ b/Documentation/git-shortlog.txt
@@ -47,9 +47,16 @@ OPTIONS
Each pretty-printed commit will be rewrapped before it is shown.
+--group=<type>::
+ Group commits based on `<type>`. If no `--group` option is
+ specified, the default is `author`. `<type>` is one of:
++
+ - `author`, commits are grouped by author
+ - `committer`, commits are grouped by committer (the same as `-c`)
+
-c::
--committer::
- Collect and show committer identities instead of authors.
+ This is an alias for `--group=committer`.
-w[<width>[,<indent1>[,<indent2>]]]::
Linewrap the output by wrapping each line at `width`. The first