blob: 0f96644e54eba4985023618a2951bca58d738017 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Junio C Hamanoba4b9282008-07-06 05:20:316<meta name="generator" content="AsciiDoc 8.2.5" />
Junio C Hamano1a4e8412005-12-27 08:17:237<style type="text/css">
8/* Debug borders */
9p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10/*
11 border: 1px solid red;
12*/
13}
14
15body {
16 margin: 1em 5% 1em 5%;
17}
18
Junio C Hamanoba4b9282008-07-06 05:20:3119a {
20 color: blue;
21 text-decoration: underline;
22}
23a:visited {
24 color: fuchsia;
25}
Junio C Hamano1a4e8412005-12-27 08:17:2326
27em {
28 font-style: italic;
29}
30
31strong {
32 font-weight: bold;
33}
34
35tt {
36 color: navy;
37}
38
39h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
45}
46
Junio C Hamanoba4b9282008-07-06 05:20:3147h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2348 border-bottom: 2px solid silver;
49}
50h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2351 padding-top: 0.5em;
52}
Junio C Hamanoba4b9282008-07-06 05:20:3153h3 {
54 float: left;
55}
56h3 + * {
57 clear: left;
58}
Junio C Hamano1a4e8412005-12-27 08:17:2359
60div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
63}
64
65hr {
66 border: 1px solid silver;
67}
68
69p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
72}
73
74pre {
75 padding: 0;
76 margin: 0;
77}
78
79span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3183 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:2384}
85span#email {
86}
87span#revision {
88 font-family: sans-serif;
89}
90
91div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
97}
98div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
101}
102div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
105}
106
107div#preamble,
108div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
114}
115div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
118}
119
120div.content { /* Block element content. */
121 padding: 0;
122}
123
124/* Block element titles. */
125div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
131}
132div.title + * {
133 margin-top: 0;
134}
135
136td div.title:first-child {
137 margin-top: 0.0em;
138}
139div.content div.title:first-child {
140 margin-top: 0.0em;
141}
142div.content + div.title {
143 margin-top: 0.0em;
144}
145
146div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
150}
151
Junio C Hamanoba4b9282008-07-06 05:20:31152div.listingblock {
153 margin-right: 0%;
154}
Junio C Hamano1a4e8412005-12-27 08:17:23155div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
159}
160
161div.quoteblock > div.content {
162 padding-left: 2.0em;
163}
Junio C Hamanoba4b9282008-07-06 05:20:31164
165div.attribution {
Junio C Hamano1a4e8412005-12-27 08:17:23166 text-align: right;
167}
Junio C Hamanoba4b9282008-07-06 05:20:31168div.verseblock + div.attribution {
169 text-align: left;
170}
Junio C Hamano1a4e8412005-12-27 08:17:23171
172div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
179}
180div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
183}
184
185div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
188}
189
190div.verseblock div.content {
191 white-space: pre;
192}
193
194div.imageblock div.content { padding-left: 0; }
195div.imageblock img { border: 1px solid silver; }
196span.image img { border-style: none; }
197
198dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
201}
202dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
206}
207dd > *:first-child {
208 margin-top: 0;
209}
210
211ul, ol {
212 list-style-position: outside;
213}
Junio C Hamanoba4b9282008-07-06 05:20:31214div.olist2 ol {
Junio C Hamano1a4e8412005-12-27 08:17:23215 list-style-type: lower-alpha;
216}
217
218div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31219 border: 3px solid #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23220}
221thead {
222 font-family: sans-serif;
223 font-weight: bold;
224}
225tfoot {
226 font-weight: bold;
227}
228
229div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
Junio C Hamanoba4b9282008-07-06 05:20:31233div.hlist td {
234 padding-bottom: 5px;
235}
Junio C Hamano1a4e8412005-12-27 08:17:23236td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
240}
241td.hlist2 {
242 vertical-align: top;
243}
244
245@media print {
246 div#footer-badges { display: none; }
247}
Junio C Hamanoba4b9282008-07-06 05:20:31248
249div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
256}
257
258div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
261}
262div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
265}
266div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
269}
270div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
273}
274include1::./stylesheets/xhtml11-manpage.css[]
Junio C Hamano1a4e8412005-12-27 08:17:23275/* Workarounds for IE6's broken and incomplete CSS2. */
276
277div.sidebar-content {
278 background: #ffffee;
279 border: 1px solid silver;
280 padding: 0.5em;
281}
282div.sidebar-title, div.image-title {
283 font-family: sans-serif;
284 font-weight: bold;
285 margin-top: 0.0em;
286 margin-bottom: 0.5em;
287}
288
289div.listingblock div.content {
290 border: 1px solid silver;
291 background: #f4f4f4;
292 padding: 0.5em;
293}
294
295div.quoteblock-content {
296 padding-left: 2.0em;
297}
298
299div.exampleblock-content {
300 border-left: 2px solid silver;
301 padding-left: 0.5em;
302}
Junio C Hamanoba4b9282008-07-06 05:20:31303
304/* IE6 sets dynamically generated links as visited. */
305div#toc a:visited { color: blue; }
Junio C Hamano1a4e8412005-12-27 08:17:23306</style>
307<title>git-whatchanged(1)</title>
308</head>
309<body>
310<div id="header">
311<h1>
312git-whatchanged(1) Manual Page
313</h1>
314<h2>NAME</h2>
315<div class="sectionbody">
316<p>git-whatchanged -
Junio C Hamano01078922006-03-10 00:31:47317 Show logs with difference each commit introduces
Junio C Hamano1a4e8412005-12-27 08:17:23318</p>
319</div>
320</div>
321<h2>SYNOPSIS</h2>
322<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31323<div class="para"><p><em>git whatchanged</em> &lt;option&gt;&#8230;</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23324</div>
Junio C Hamanoba4b9282008-07-06 05:20:31325<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23326<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31327<div class="para"><p>Shows commit logs and diff output each commit introduces. The
Junio C Hamano1aa40d22010-01-21 17:46:43328command internally invokes <em>git rev-list</em> piped to
329<em>git diff-tree</em>, and takes command line options for both of
Junio C Hamanoba4b9282008-07-06 05:20:31330these commands.</p></div>
331<div class="para"><p>This manual page describes only the most frequently used options.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23332</div>
Junio C Hamanoba4b9282008-07-06 05:20:31333<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23334<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31335<div class="vlist"><dl>
Junio C Hamano1a4e8412005-12-27 08:17:23336<dt>
337-p
338</dt>
339<dd>
340<p>
341 Show textual diffs, instead of the git internal diff
342 output format that is useful only to tell the changed
343 paths and their nature of changes.
344</p>
345</dd>
346<dt>
Junio C Hamanof9771f62007-01-17 17:42:30347-&lt;n&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23348</dt>
349<dd>
350<p>
351 Limit output to &lt;n&gt; commits.
352</p>
353</dd>
354<dt>
355&lt;since&gt;..&lt;until&gt;
356</dt>
357<dd>
358<p>
359 Limit output to between the two named commits (bottom
360 exclusive, top inclusive).
361</p>
362</dd>
363<dt>
364-r
365</dt>
366<dd>
367<p>
368 Show git internal diff output, but for the whole tree,
369 not just the top level.
370</p>
371</dd>
372<dt>
Junio C Hamano1a4e8412005-12-27 08:17:23373-m
374</dt>
375<dd>
376<p>
377 By default, differences for merge commits are not shown.
378 With this flag, show differences to that commit from all
379 of its parents.
380</p>
Junio C Hamanoba4b9282008-07-06 05:20:31381<div class="para"><p>However, it is not very useful in general, although it
382<strong>is</strong> useful on a file-by-file basis.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23383</dd>
Junio C Hamano86bcccc2008-03-08 09:33:55384<dt>
385--pretty[=<em>&lt;format&gt;</em>]
386</dt>
Junio C Hamano0a235222009-03-06 08:21:09387<dt>
388--format[=<em>&lt;format&gt;</em>]
389</dt>
Junio C Hamano86bcccc2008-03-08 09:33:55390<dd>
391<p>
392 Pretty-print the contents of the commit logs in a given format,
393 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
Junio C Hamanoe32ec8b2010-06-02 23:32:31394 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
395 the "PRETTY FORMATS" section for some additional details for each
396 format. When omitted, the format defaults to <em>medium</em>.
Junio C Hamano86bcccc2008-03-08 09:33:55397</p>
Junio C Hamanoba4b9282008-07-06 05:20:31398<div class="para"><p>Note: you can specify the default pretty format in the repository
399configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamano86bcccc2008-03-08 09:33:55400</dd>
401<dt>
402--abbrev-commit
403</dt>
404<dd>
405<p>
406 Instead of showing the full 40-byte hexadecimal commit object
Junio C Hamano6efe3022009-01-13 16:47:56407 name, show only a partial prefix. Non default number of
Junio C Hamano86bcccc2008-03-08 09:33:55408 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
409 diff output, if it is displayed).
410</p>
Junio C Hamanoba4b9282008-07-06 05:20:31411<div class="para"><p>This should make "--pretty=oneline" a whole lot more readable for
412people using 80-column terminals.</p></div>
Junio C Hamano86bcccc2008-03-08 09:33:55413</dd>
414<dt>
Junio C Hamano0a235222009-03-06 08:21:09415--oneline
416</dt>
417<dd>
418<p>
419 This is a shorthand for "--pretty=oneline --abbrev-commit"
420 used together.
421</p>
422</dd>
423<dt>
Junio C Hamano86bcccc2008-03-08 09:33:55424--encoding[=&lt;encoding&gt;]
425</dt>
426<dd>
427<p>
428 The commit objects record the encoding used for the log message
429 in their encoding header; this option can be used to tell the
430 command to re-code the commit log message in the encoding
431 preferred by the user. For non plumbing commands this
432 defaults to UTF-8.
433</p>
434</dd>
Junio C Hamano57827fb2010-01-23 03:02:50435<dt>
436--no-notes
437</dt>
438<dt>
Junio C Hamano31667362010-03-25 00:38:53439--show-notes[=&lt;ref&gt;]
Junio C Hamano57827fb2010-01-23 03:02:50440</dt>
441<dd>
442<p>
443 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
444 commit, when showing the commit log message. This is the default
445 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
446 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option is
447 given on the command line.
448</p>
Junio C Hamano31667362010-03-25 00:38:53449<div class="para"><p>With an optional argument, add this ref to the list of notes. The ref
450is taken to be in <tt>refs/notes/</tt> if it is not qualified.</p></div>
451</dd>
452<dt>
453--[no-]standard-notes
454</dt>
455<dd>
456<p>
457 Enable or disable populating the notes ref list from the
458 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or
459 corresponding environment overrides). Enabled by default.
460 See <a href="git-config.html">git-config(1)</a>.
461</p>
Junio C Hamano57827fb2010-01-23 03:02:50462</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31463</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:23464</div>
Junio C Hamanoba4b9282008-07-06 05:20:31465<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano86bcccc2008-03-08 09:33:55466<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31467<div class="para"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano86bcccc2008-03-08 09:33:55468is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
469inserted before the <em>Author:</em> line. This line begins with
470"Merge: " and the sha1s of ancestral commits are printed,
471separated by spaces. Note that the listed commits may not
472necessarily be the list of the <strong>direct</strong> parent commits if you
473have limited your view of history: for example, if you are
474only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:31475file.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:10476<div class="para"><p>There are several built-in formats, and you can define
477additional formats by setting a pretty.&lt;name&gt;
478config option to either another format name, or a
479<em>format:</em> string, as described below (see
480<a href="git-config.html">git-config(1)</a>). Here are the details of the
481built-in formats:</p></div>
Junio C Hamanoba4b9282008-07-06 05:20:31482<div class="ilist"><ul>
Junio C Hamano86bcccc2008-03-08 09:33:55483<li>
484<p>
485<em>oneline</em>
486</p>
487<div class="literalblock">
488<div class="content">
489<pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
490</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31491<div class="para"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamano86bcccc2008-03-08 09:33:55492</li>
493<li>
494<p>
495<em>short</em>
496</p>
497<div class="literalblock">
498<div class="content">
499<pre><tt>commit &lt;sha1&gt;
500Author: &lt;author&gt;</tt></pre>
501</div></div>
502<div class="literalblock">
503<div class="content">
504<pre><tt>&lt;title line&gt;</tt></pre>
505</div></div>
506</li>
507<li>
508<p>
509<em>medium</em>
510</p>
511<div class="literalblock">
512<div class="content">
513<pre><tt>commit &lt;sha1&gt;
514Author: &lt;author&gt;
Junio C Hamano6a3c8272008-12-19 21:38:18515Date: &lt;author date&gt;</tt></pre>
Junio C Hamano86bcccc2008-03-08 09:33:55516</div></div>
517<div class="literalblock">
518<div class="content">
519<pre><tt>&lt;title line&gt;</tt></pre>
520</div></div>
521<div class="literalblock">
522<div class="content">
523<pre><tt>&lt;full commit message&gt;</tt></pre>
524</div></div>
525</li>
526<li>
527<p>
528<em>full</em>
529</p>
530<div class="literalblock">
531<div class="content">
532<pre><tt>commit &lt;sha1&gt;
533Author: &lt;author&gt;
534Commit: &lt;committer&gt;</tt></pre>
535</div></div>
536<div class="literalblock">
537<div class="content">
538<pre><tt>&lt;title line&gt;</tt></pre>
539</div></div>
540<div class="literalblock">
541<div class="content">
542<pre><tt>&lt;full commit message&gt;</tt></pre>
543</div></div>
544</li>
545<li>
546<p>
547<em>fuller</em>
548</p>
549<div class="literalblock">
550<div class="content">
551<pre><tt>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:18552Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:31553AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:18554Commit: &lt;committer&gt;
Junio C Hamanoba4b9282008-07-06 05:20:31555CommitDate: &lt;committer date&gt;</tt></pre>
Junio C Hamano86bcccc2008-03-08 09:33:55556</div></div>
557<div class="literalblock">
558<div class="content">
559<pre><tt>&lt;title line&gt;</tt></pre>
560</div></div>
561<div class="literalblock">
562<div class="content">
563<pre><tt>&lt;full commit message&gt;</tt></pre>
564</div></div>
565</li>
566<li>
567<p>
568<em>email</em>
569</p>
570<div class="literalblock">
571<div class="content">
572<pre><tt>From &lt;sha1&gt; &lt;date&gt;
573From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:31574Date: &lt;author date&gt;
Junio C Hamano86bcccc2008-03-08 09:33:55575Subject: [PATCH] &lt;title line&gt;</tt></pre>
576</div></div>
577<div class="literalblock">
578<div class="content">
579<pre><tt>&lt;full commit message&gt;</tt></pre>
580</div></div>
581</li>
582<li>
583<p>
584<em>raw</em>
585</p>
Junio C Hamanoba4b9282008-07-06 05:20:31586<div class="para"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamano86bcccc2008-03-08 09:33:55587stored in the commit object. Notably, the SHA1s are
588displayed in full, regardless of whether --abbrev or
589--no-abbrev are used, and <em>parents</em> information show the
590true parent commits, without taking grafts nor history
Junio C Hamanoba4b9282008-07-06 05:20:31591simplification into account.</p></div>
Junio C Hamano86bcccc2008-03-08 09:33:55592</li>
593<li>
594<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:31595<em>format:&lt;string&gt;</em>
Junio C Hamano86bcccc2008-03-08 09:33:55596</p>
Junio C Hamanoe32ec8b2010-06-02 23:32:31597<div class="para"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
Junio C Hamano86bcccc2008-03-08 09:33:55598you want to show. It works a little bit like printf format,
599with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:31600instead of <em>\n</em>.</p></div>
601<div class="para"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
602would show something like this:</p></div>
Junio C Hamano86bcccc2008-03-08 09:33:55603<div class="listingblock">
604<div class="content">
605<pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
606The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;
607</tt></pre>
608</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31609<div class="para"><p>The placeholders are:</p></div>
610<div class="ilist"><ul>
Junio C Hamano86bcccc2008-03-08 09:33:55611<li>
612<p>
613<em>%H</em>: commit hash
614</p>
615</li>
616<li>
617<p>
618<em>%h</em>: abbreviated commit hash
619</p>
620</li>
621<li>
622<p>
623<em>%T</em>: tree hash
624</p>
625</li>
626<li>
627<p>
628<em>%t</em>: abbreviated tree hash
629</p>
630</li>
631<li>
632<p>
633<em>%P</em>: parent hashes
634</p>
635</li>
636<li>
637<p>
638<em>%p</em>: abbreviated parent hashes
639</p>
640</li>
641<li>
642<p>
643<em>%an</em>: author name
644</p>
645</li>
646<li>
647<p>
Junio C Hamano8bc410e2009-02-15 10:38:19648<em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:57649</p>
650</li>
651<li>
652<p>
Junio C Hamano86bcccc2008-03-08 09:33:55653<em>%ae</em>: author email
654</p>
655</li>
656<li>
657<p>
Junio C Hamano8bc410e2009-02-15 10:38:19658<em>%aE</em>: author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
659</p>
660</li>
661<li>
662<p>
Junio C Hamanoa387df32008-08-29 08:56:58663<em>%ad</em>: author date (format respects --date= option)
Junio C Hamano86bcccc2008-03-08 09:33:55664</p>
665</li>
666<li>
667<p>
668<em>%aD</em>: author date, RFC2822 style
669</p>
670</li>
671<li>
672<p>
673<em>%ar</em>: author date, relative
674</p>
675</li>
676<li>
677<p>
678<em>%at</em>: author date, UNIX timestamp
679</p>
680</li>
681<li>
682<p>
683<em>%ai</em>: author date, ISO 8601 format
684</p>
685</li>
686<li>
687<p>
688<em>%cn</em>: committer name
689</p>
690</li>
691<li>
692<p>
Junio C Hamano8bc410e2009-02-15 10:38:19693<em>%cN</em>: committer name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:57694</p>
695</li>
696<li>
697<p>
Junio C Hamano86bcccc2008-03-08 09:33:55698<em>%ce</em>: committer email
699</p>
700</li>
701<li>
702<p>
Junio C Hamano8bc410e2009-02-15 10:38:19703<em>%cE</em>: committer email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
704</p>
705</li>
706<li>
707<p>
Junio C Hamano86bcccc2008-03-08 09:33:55708<em>%cd</em>: committer date
709</p>
710</li>
711<li>
712<p>
713<em>%cD</em>: committer date, RFC2822 style
714</p>
715</li>
716<li>
717<p>
718<em>%cr</em>: committer date, relative
719</p>
720</li>
721<li>
722<p>
723<em>%ct</em>: committer date, UNIX timestamp
724</p>
725</li>
726<li>
727<p>
728<em>%ci</em>: committer date, ISO 8601 format
729</p>
730</li>
731<li>
732<p>
Junio C Hamano5e4d8de2008-09-19 06:27:02733<em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
734</p>
735</li>
736<li>
737<p>
Junio C Hamano86bcccc2008-03-08 09:33:55738<em>%e</em>: encoding
739</p>
740</li>
741<li>
742<p>
743<em>%s</em>: subject
744</p>
745</li>
746<li>
747<p>
Junio C Hamano5f9a6f02009-04-06 08:26:56748<em>%f</em>: sanitized subject line, suitable for a filename
749</p>
750</li>
751<li>
752<p>
Junio C Hamano86bcccc2008-03-08 09:33:55753<em>%b</em>: body
754</p>
755</li>
756<li>
757<p>
Junio C Hamanocb39aea2010-05-09 07:24:48758<em>%B</em>: raw body (unwrapped subject and body)
759</p>
760</li>
761<li>
762<p>
Junio C Hamano3b70d3c2009-11-21 17:37:37763<em>%N</em>: commit notes
764</p>
765</li>
766<li>
767<p>
Junio C Hamanoc21ab052009-10-31 04:03:55768<em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
769</p>
770</li>
771<li>
772<p>
773<em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
774</p>
775</li>
776<li>
777<p>
778<em>%gs</em>: reflog subject
779</p>
780</li>
781<li>
782<p>
Junio C Hamano86bcccc2008-03-08 09:33:55783<em>%Cred</em>: switch color to red
784</p>
785</li>
786<li>
787<p>
788<em>%Cgreen</em>: switch color to green
789</p>
790</li>
791<li>
792<p>
793<em>%Cblue</em>: switch color to blue
794</p>
795</li>
796<li>
797<p>
798<em>%Creset</em>: reset color
799</p>
800</li>
801<li>
802<p>
Junio C Hamanocc0cb312009-01-22 03:38:50803<em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
804</p>
805</li>
806<li>
807<p>
Junio C Hamano86bcccc2008-03-08 09:33:55808<em>%m</em>: left, right or boundary mark
809</p>
810</li>
811<li>
812<p>
813<em>%n</em>: newline
814</p>
815</li>
Junio C Hamanob78d2592008-04-09 09:39:08816<li>
817<p>
Junio C Hamanoa9701f02010-01-21 00:42:16818<em>%%</em>: a raw <em>%</em>
819</p>
820</li>
821<li>
822<p>
Junio C Hamanob78d2592008-04-09 09:39:08823<em>%x00</em>: print a byte from a hex code
824</p>
825</li>
Junio C Hamanobf984de2009-11-23 06:11:19826<li>
827<p>
828<em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
Junio C Hamano5706e0b2009-11-24 10:54:16829 <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanobf984de2009-11-23 06:11:19830</p>
831</li>
Junio C Hamanoba4b9282008-07-06 05:20:31832</ul></div>
Junio C Hamano86bcccc2008-03-08 09:33:55833</li>
Junio C Hamanoc21ab052009-10-31 04:03:55834</ul></div>
835<div class="admonitionblock">
836<table><tr>
837<td class="icon">
838<div class="title">Note</div>
839</td>
840<td class="content">Some placeholders may depend on other options given to the
841revision traversal engine. For example, the <tt>%g*</tt> reflog options will
842insert an empty string unless we are traversing reflog entries (e.g., by
843<tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
844format if <tt>--decorate</tt> was not already provided on the command line.</td>
845</tr></table>
846</div>
Junio C Hamano2bd8a742009-12-01 21:16:59847<div class="para"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
848is inserted immediately before the expansion if and only if the
849placeholder expands to a non-empty string.</p></div>
850<div class="para"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
851immediately precede the expansion are deleted if and only if the
852placeholder expands to an empty string.</p></div>
Junio C Hamanoc21ab052009-10-31 04:03:55853<div class="ilist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:01854<li>
855<p>
856<em>tformat:</em>
857</p>
Junio C Hamanoba4b9282008-07-06 05:20:31858<div class="para"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
Junio C Hamano6fb124c2008-06-13 10:04:01859provides "terminator" semantics instead of "separator" semantics. In
860other words, each commit has the message terminator character (usually a
861newline) appended, rather than a separator placed between entries.
862This means that the final entry of a single-line format will be properly
863terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:31864For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:01865<div class="listingblock">
866<div class="content">
867<pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
868 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
8694da45be
8707134973 -- NO NEWLINE
871
872$ git log -2 --pretty=tformat:%h 4da45bef \
873 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
8744da45be
8757134973</tt></pre>
876</div></div>
Junio C Hamano0a235222009-03-06 08:21:09877<div class="para"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
878as if it has <tt>tformat:</tt> in front of it. For example, these two are
879equivalent:</p></div>
880<div class="listingblock">
881<div class="content">
882<pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
883$ git log -2 --pretty=%h 4da45bef</tt></pre>
884</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:01885</li>
Junio C Hamanoba4b9282008-07-06 05:20:31886</ul></div>
Junio C Hamano86bcccc2008-03-08 09:33:55887</div>
Junio C Hamanoba4b9282008-07-06 05:20:31888<h2 id="_examples">Examples</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23889<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31890<div class="vlist"><dl>
Junio C Hamano1a4e8412005-12-27 08:17:23891<dt>
Junio C Hamanofce7c7e2008-07-02 03:06:38892git whatchanged -p v2.6.12.. include/scsi drivers/scsi
Junio C Hamano1a4e8412005-12-27 08:17:23893</dt>
894<dd>
895<p>
896 Show as patches the commits since version <em>v2.6.12</em> that changed
897 any file in the include/scsi or drivers/scsi subdirectories
898</p>
899</dd>
900<dt>
Junio C Hamanofce7c7e2008-07-02 03:06:38901git whatchanged --since="2 weeks ago" -- gitk
Junio C Hamano1a4e8412005-12-27 08:17:23902</dt>
903<dd>
904<p>
905 Show the changes during the last two weeks to the file <em>gitk</em>.
906 The "--" is necessary to avoid confusion with the <strong>branch</strong> named
907 <em>gitk</em>
908</p>
909</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31910</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:23911</div>
Junio C Hamanoba4b9282008-07-06 05:20:31912<h2 id="_author">Author</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23913<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31914<div class="para"><p>Written by Linus Torvalds &lt;torvalds@osdl.org&gt; and
Junio C Hamano0868a302008-07-22 09:20:44915Junio C Hamano &lt;gitster@pobox.com&gt;</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23916</div>
Junio C Hamanoba4b9282008-07-06 05:20:31917<h2 id="_documentation">Documentation</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23918<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31919<div class="para"><p>Documentation by David Greaves, Junio C Hamano and the git-list &lt;git@vger.kernel.org&gt;.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23920</div>
Junio C Hamanoba4b9282008-07-06 05:20:31921<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23922<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31923<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23924</div>
925<div id="footer">
926<div id="footer-text">
Junio C Hamanoa574a092010-06-13 19:57:10927Last updated 2010-06-13 19:56:37 UTC
Junio C Hamano1a4e8412005-12-27 08:17:23928</div>
929</div>
930</body>
931</html>