From 92338c450bc41e8e3da31a10d2ab73844e8b0634 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 27 Sep 2020 04:39:59 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-shortlog.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Documentation/git-shortlog.txt') diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index a72ea7f7ba..6496d313c1 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=:: + Group commits based on ``. If no `--group` option is + specified, the default is `author`. `` 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[[,[,]]]:: Linewrap the output by wrapping each line at `width`. The first -- cgit v1.2.3