Add map_user() and clear_mailmap() to mailmap
[git/git.git] / Documentation / git-shortlog.txt
1 git-shortlog(1)
2 ===============
3
4 NAME
5 ----
6 git-shortlog - Summarize 'git-log' output
7
8 SYNOPSIS
9 --------
10 [verse]
11 git log --pretty=short | 'git shortlog' [-h] [-n] [-s] [-e] [-w]
12 git shortlog [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[,<indent2>]]]] [<committish>...]
13
14 DESCRIPTION
15 -----------
16 Summarizes 'git-log' output in a format suitable for inclusion
17 in release announcements. Each commit will be grouped by author and
18 the first line of the commit message will be shown.
19
20 Additionally, "[PATCH]" will be stripped from the commit description.
21
22 OPTIONS
23 -------
24
25 -h::
26 --help::
27 Print a short usage message and exit.
28
29 -n::
30 --numbered::
31 Sort output according to the number of commits per author instead
32 of author alphabetic order.
33
34 -s::
35 --summary::
36 Suppress commit description and provide a commit count summary only.
37
38 -e::
39 --email::
40 Show the email address of each author.
41
42 -w[<width>[,<indent1>[,<indent2>]]]::
43 Linewrap the output by wrapping each line at `width`. The first
44 line of each entry is indented by `indent1` spaces, and the second
45 and subsequent lines are indented by `indent2` spaces. `width`,
46 `indent1`, and `indent2` default to 76, 6 and 9 respectively.
47
48 FILES
49 -----
50
51 If the file `.mailmap` exists at the toplevel of the repository, or at
52 the location pointed to by the mailmap.file configuration option, it
53 is used to map author and committer names and email addresses to
54 canonical real names and email addresses.
55 This mapping can be used to coalesce together commits by the same
56 person where their name and/or email address was spelled differently.
57
58 In the simple form, each line in the file consists of the canonical
59 real name of an author, whitespace, and an email address used in the
60 commit (enclosed by '<' and '>') to map to the name. Thus, looks like
61 this
62 --
63 Proper Name <commit@email.xx>
64 --
65
66 The more complex forms are
67 --
68 <proper@email.xx> <commit@email.xx>
69 --
70 which allows mailmap to replace only the email part of a commit, and
71 --
72 Proper Name <proper@email.xx> <commit@email.xx>
73 --
74 which allows mailmap to replace both the name and the email of a
75 commit matching the specified commit email address, and
76 --
77 Proper Name <proper@email.xx> Commit Name <commit@email.xx>
78 --
79 which allows mailmap to replace both the name and the email of a
80 commit matching both the specified commit name and email address.
81
82 Example 1: Your history contains commits by two authors, Jane
83 and Joe, whose names appear in the repository under several forms:
84
85 ------------
86 Joe Developer <joe@example.com>
87 Joe R. Developer <joe@example.com>
88 Jane Doe <jane@example.com>
89 Jane Doe <jane@laptop.(none)>
90 Jane D. <jane@desktop.(none)>
91 ------------
92
93 Now suppose that Joe wants his middle name initial used, and Jane
94 prefers her family name fully spelled out. A proper `.mailmap` file
95 would look like:
96
97 ------------
98 Jane Doe <jane@desktop.(none)>
99 Joe R. Developer <joe@example.com>
100 ------------
101
102 Note how we don't need an entry for <jane@laptop.(none)>, because the
103 real name of that author is correct already, and coalesced directly.
104
105 Example 2: Your repository contains commits from the following
106 authors:
107
108 ------------
109 nick1 <bugs@company.xx>
110 nick2 <bugs@company.xx>
111 nick2 <nick2@company.xx>
112 santa <me@company.xx>
113 claus <me@company.xx>
114 CTO <cto@coompany.xx>
115 ------------
116
117 Then, you might want a `.mailmap` file looking like:
118 ------------
119 <cto@company.xx> <cto@coompany.xx>
120 Some Dude <some@dude.xx> nick1 <bugs@company.xx>
121 Other Author <other@author.xx> nick2 <bugs@company.xx>
122 Other Author <other@author.xx> <nick2@company.xx>
123 Santa Claus <santa.claus@northpole.xx> <me@company.xx>
124 ------------
125
126 Use hash '#' for comments that are either on their own line, or after
127 the email address.
128
129
130 Author
131 ------
132 Written by Jeff Garzik <jgarzik@pobox.com>
133
134 Documentation
135 --------------
136 Documentation by Junio C Hamano.
137
138 GIT
139 ---
140 Part of the linkgit:git[1] suite