summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-10-04 19:49:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-04 19:49:14 (GMT)
commit2fa8aacc723d4c76b84d449fa7cf0de6cf40e5ad (patch)
treee1a865fa66fadcd8cc2380ddb206b86f572aabf3 /Documentation
parentea1f6118b772d8d03302937afc16e71719d33587 (diff)
parent63d24fa0b055d3f0386ee3686c07428450add708 (diff)
downloadgit-2fa8aacc723d4c76b84d449fa7cf0de6cf40e5ad.zip
git-2fa8aacc723d4c76b84d449fa7cf0de6cf40e5ad.tar.gz
git-2fa8aacc723d4c76b84d449fa7cf0de6cf40e5ad.tar.bz2
Merge branch 'jk/shortlog-group-by-trailer'
"git shortlog" has been taught to group commits by the contents of the trailer lines, like "Reviewed-by:", "Coauthored-by:", etc. * jk/shortlog-group-by-trailer: shortlog: allow multiple groups to be specified shortlog: parse trailer idents shortlog: rename parse_stdin_ident() shortlog: de-duplicate trailer values shortlog: match commit trailers with --group trailer: add interface for iterating over commit trailers shortlog: add grouping option shortlog: change "author" variables to "ident"
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-shortlog.txt31
1 files changed, 30 insertions, 1 deletions
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
index a72ea7f..fd93cd4 100644
--- a/Documentation/git-shortlog.txt
+++ b/Documentation/git-shortlog.txt
@@ -47,9 +47,38 @@ 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`)
+ - `trailer:<field>`, the `<field>` is interpreted as a case-insensitive
+ commit message trailer (see linkgit:git-interpret-trailers[1]). For
+ example, if your project uses `Reviewed-by` trailers, you might want
+ to see who has been reviewing with
+ `git shortlog -ns --group=trailer:reviewed-by`.
++
+Note that commits that do not include the trailer will not be counted.
+Likewise, commits with multiple trailers (e.g., multiple signoffs) may
+be counted more than once (but only once per unique trailer value in
+that commit).
++
+Shortlog will attempt to parse each trailer value as a `name <email>`
+identity. If successful, the mailmap is applied and the email is omitted
+unless the `--email` option is specified. If the value cannot be parsed
+as an identity, it will be taken literally and completely.
+--
++
+If `--group` is specified multiple times, commits are counted under each
+value (but again, only once per unique value in that commit). For
+example, `git shortlog --group=author --group=trailer:co-authored-by`
+counts both authors and co-authors.
+
-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