blob: 47989e5eb911fa63e197c756e96a0068de621177 [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 Hamano01078922006-03-10 00:31:476<meta name="generator" content="AsciiDoc 7.0.2" />
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
19a { color: blue; }
20a:visited { color: fuchsia; }
21
22em {
23 font-style: italic;
24}
25
26strong {
27 font-weight: bold;
28}
29
30tt {
31 color: navy;
32}
33
34h1, h2, h3, h4, h5, h6 {
35 color: #527bbd;
36 font-family: sans-serif;
37 margin-top: 1.2em;
38 margin-bottom: 0.5em;
39 line-height: 1.3;
40}
41
42h1 {
43 border-bottom: 2px solid silver;
44}
45h2 {
46 border-bottom: 2px solid silver;
47 padding-top: 0.5em;
48}
49
50div.sectionbody {
51 font-family: serif;
52 margin-left: 0;
53}
54
55hr {
56 border: 1px solid silver;
57}
58
59p {
60 margin-top: 0.5em;
61 margin-bottom: 0.5em;
62}
63
64pre {
65 padding: 0;
66 margin: 0;
67}
68
69span#author {
70 color: #527bbd;
71 font-family: sans-serif;
72 font-weight: bold;
73 font-size: 1.2em;
74}
75span#email {
76}
77span#revision {
78 font-family: sans-serif;
79}
80
81div#footer {
82 font-family: sans-serif;
83 font-size: small;
84 border-top: 2px solid silver;
85 padding-top: 0.5em;
86 margin-top: 4.0em;
87}
88div#footer-text {
89 float: left;
90 padding-bottom: 0.5em;
91}
92div#footer-badges {
93 float: right;
94 padding-bottom: 0.5em;
95}
96
97div#preamble,
98div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
99div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
100div.admonitionblock {
101 margin-right: 10%;
102 margin-top: 1.5em;
103 margin-bottom: 1.5em;
104}
105div.admonitionblock {
106 margin-top: 2.5em;
107 margin-bottom: 2.5em;
108}
109
110div.content { /* Block element content. */
111 padding: 0;
112}
113
114/* Block element titles. */
115div.title, caption.title {
116 font-family: sans-serif;
117 font-weight: bold;
118 text-align: left;
119 margin-top: 1.0em;
120 margin-bottom: 0.5em;
121}
122div.title + * {
123 margin-top: 0;
124}
125
126td div.title:first-child {
127 margin-top: 0.0em;
128}
129div.content div.title:first-child {
130 margin-top: 0.0em;
131}
132div.content + div.title {
133 margin-top: 0.0em;
134}
135
136div.sidebarblock > div.content {
137 background: #ffffee;
138 border: 1px solid silver;
139 padding: 0.5em;
140}
141
142div.listingblock > div.content {
143 border: 1px solid silver;
144 background: #f4f4f4;
145 padding: 0.5em;
146}
147
148div.quoteblock > div.content {
149 padding-left: 2.0em;
150}
151div.quoteblock .attribution {
152 text-align: right;
153}
154
155div.admonitionblock .icon {
156 vertical-align: top;
157 font-size: 1.1em;
158 font-weight: bold;
159 text-decoration: underline;
160 color: #527bbd;
161 padding-right: 0.5em;
162}
163div.admonitionblock td.content {
164 padding-left: 0.5em;
165 border-left: 2px solid silver;
166}
167
168div.exampleblock > div.content {
169 border-left: 2px solid silver;
170 padding: 0.5em;
171}
172
173div.verseblock div.content {
174 white-space: pre;
175}
176
177div.imageblock div.content { padding-left: 0; }
178div.imageblock img { border: 1px solid silver; }
179span.image img { border-style: none; }
180
181dl {
182 margin-top: 0.8em;
183 margin-bottom: 0.8em;
184}
185dt {
186 margin-top: 0.5em;
187 margin-bottom: 0;
188 font-style: italic;
189}
190dd > *:first-child {
191 margin-top: 0;
192}
193
194ul, ol {
195 list-style-position: outside;
196}
197ol.olist2 {
198 list-style-type: lower-alpha;
199}
200
201div.tableblock > table {
202 border-color: #527bbd;
203 border-width: 3px;
204}
205thead {
206 font-family: sans-serif;
207 font-weight: bold;
208}
209tfoot {
210 font-weight: bold;
211}
212
213div.hlist {
214 margin-top: 0.8em;
215 margin-bottom: 0.8em;
216}
217td.hlist1 {
218 vertical-align: top;
219 font-style: italic;
220 padding-right: 0.8em;
221}
222td.hlist2 {
223 vertical-align: top;
224}
225
226@media print {
227 div#footer-badges { display: none; }
228}
229include::./stylesheets/xhtml11-manpage.css[]
230/* Workarounds for IE6's broken and incomplete CSS2. */
231
232div.sidebar-content {
233 background: #ffffee;
234 border: 1px solid silver;
235 padding: 0.5em;
236}
237div.sidebar-title, div.image-title {
238 font-family: sans-serif;
239 font-weight: bold;
240 margin-top: 0.0em;
241 margin-bottom: 0.5em;
242}
243
244div.listingblock div.content {
245 border: 1px solid silver;
246 background: #f4f4f4;
247 padding: 0.5em;
248}
249
250div.quoteblock-content {
251 padding-left: 2.0em;
252}
253
254div.exampleblock-content {
255 border-left: 2px solid silver;
256 padding-left: 0.5em;
257}
258</style>
259<title>git-whatchanged(1)</title>
260</head>
261<body>
262<div id="header">
263<h1>
264git-whatchanged(1) Manual Page
265</h1>
266<h2>NAME</h2>
267<div class="sectionbody">
268<p>git-whatchanged -
Junio C Hamano01078922006-03-10 00:31:47269 Show logs with difference each commit introduces
Junio C Hamano1a4e8412005-12-27 08:17:23270</p>
271</div>
272</div>
273<h2>SYNOPSIS</h2>
274<div class="sectionbody">
Junio C Hamanofce7c7e2008-07-02 03:06:38275<p><em>git whatchanged</em> &lt;option&gt;&#8230;</p>
Junio C Hamano1a4e8412005-12-27 08:17:23276</div>
277<h2>DESCRIPTION</h2>
278<div class="sectionbody">
279<p>Shows commit logs and diff output each commit introduces. The
Junio C Hamanofce7c7e2008-07-02 03:06:38280command internally invokes <tt>git-rev-list</tt> piped to
281<tt>git-diff-tree</tt>, and takes command line options for both of
Junio C Hamano1a4e8412005-12-27 08:17:23282these commands.</p>
283<p>This manual page describes only the most frequently used options.</p>
284</div>
285<h2>OPTIONS</h2>
286<div class="sectionbody">
287<dl>
288<dt>
289-p
290</dt>
291<dd>
292<p>
293 Show textual diffs, instead of the git internal diff
294 output format that is useful only to tell the changed
295 paths and their nature of changes.
296</p>
297</dd>
298<dt>
Junio C Hamanof9771f62007-01-17 17:42:30299-&lt;n&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23300</dt>
301<dd>
302<p>
303 Limit output to &lt;n&gt; commits.
304</p>
305</dd>
306<dt>
307&lt;since&gt;..&lt;until&gt;
308</dt>
309<dd>
310<p>
311 Limit output to between the two named commits (bottom
312 exclusive, top inclusive).
313</p>
314</dd>
315<dt>
316-r
317</dt>
318<dd>
319<p>
320 Show git internal diff output, but for the whole tree,
321 not just the top level.
322</p>
323</dd>
324<dt>
Junio C Hamano1a4e8412005-12-27 08:17:23325-m
326</dt>
327<dd>
328<p>
329 By default, differences for merge commits are not shown.
330 With this flag, show differences to that commit from all
331 of its parents.
332</p>
Junio C Hamanoadeb8992006-03-24 08:11:06333<p>However, it is not very useful in general, although it
334<strong>is</strong> useful on a file-by-file basis.</p>
Junio C Hamano1a4e8412005-12-27 08:17:23335</dd>
Junio C Hamano86bcccc2008-03-08 09:33:55336<dt>
337--pretty[=<em>&lt;format&gt;</em>]
338</dt>
339<dd>
340<p>
341 Pretty-print the contents of the commit logs in a given format,
342 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
343 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>.
344 When omitted, the format defaults to <em>medium</em>.
345</p>
346<p>Note: you can specify the default pretty format in the repository
347configuration (see <a href="git-config.html">git-config(1)</a>).</p>
348</dd>
349<dt>
350--abbrev-commit
351</dt>
352<dd>
353<p>
354 Instead of showing the full 40-byte hexadecimal commit object
355 name, show only handful hexdigits prefix. Non default number of
356 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
357 diff output, if it is displayed).
358</p>
359<p>This should make "--pretty=oneline" a whole lot more readable for
360people using 80-column terminals.</p>
361</dd>
362<dt>
363--encoding[=&lt;encoding&gt;]
364</dt>
365<dd>
366<p>
367 The commit objects record the encoding used for the log message
368 in their encoding header; this option can be used to tell the
369 command to re-code the commit log message in the encoding
370 preferred by the user. For non plumbing commands this
371 defaults to UTF-8.
372</p>
373</dd>
Junio C Hamano1a4e8412005-12-27 08:17:23374</dl>
375</div>
Junio C Hamano86bcccc2008-03-08 09:33:55376<h2>PRETTY FORMATS</h2>
377<div class="sectionbody">
378<p>If the commit is a merge, and if the pretty-format
379is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
380inserted before the <em>Author:</em> line. This line begins with
381"Merge: " and the sha1s of ancestral commits are printed,
382separated by spaces. Note that the listed commits may not
383necessarily be the list of the <strong>direct</strong> parent commits if you
384have limited your view of history: for example, if you are
385only interested in changes related to a certain directory or
386file.</p>
387<p>Here are some additional details for each format:</p>
388<ul>
389<li>
390<p>
391<em>oneline</em>
392</p>
393<div class="literalblock">
394<div class="content">
395<pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
396</div></div>
397<p>This is designed to be as compact as possible.</p>
398</li>
399<li>
400<p>
401<em>short</em>
402</p>
403<div class="literalblock">
404<div class="content">
405<pre><tt>commit &lt;sha1&gt;
406Author: &lt;author&gt;</tt></pre>
407</div></div>
408<div class="literalblock">
409<div class="content">
410<pre><tt>&lt;title line&gt;</tt></pre>
411</div></div>
412</li>
413<li>
414<p>
415<em>medium</em>
416</p>
417<div class="literalblock">
418<div class="content">
419<pre><tt>commit &lt;sha1&gt;
420Author: &lt;author&gt;
421Date: &lt;date&gt;</tt></pre>
422</div></div>
423<div class="literalblock">
424<div class="content">
425<pre><tt>&lt;title line&gt;</tt></pre>
426</div></div>
427<div class="literalblock">
428<div class="content">
429<pre><tt>&lt;full commit message&gt;</tt></pre>
430</div></div>
431</li>
432<li>
433<p>
434<em>full</em>
435</p>
436<div class="literalblock">
437<div class="content">
438<pre><tt>commit &lt;sha1&gt;
439Author: &lt;author&gt;
440Commit: &lt;committer&gt;</tt></pre>
441</div></div>
442<div class="literalblock">
443<div class="content">
444<pre><tt>&lt;title line&gt;</tt></pre>
445</div></div>
446<div class="literalblock">
447<div class="content">
448<pre><tt>&lt;full commit message&gt;</tt></pre>
449</div></div>
450</li>
451<li>
452<p>
453<em>fuller</em>
454</p>
455<div class="literalblock">
456<div class="content">
457<pre><tt>commit &lt;sha1&gt;
458Author: &lt;author&gt;
459AuthorDate: &lt;date &amp; time&gt;
460Commit: &lt;committer&gt;
461CommitDate: &lt;date &amp; time&gt;</tt></pre>
462</div></div>
463<div class="literalblock">
464<div class="content">
465<pre><tt>&lt;title line&gt;</tt></pre>
466</div></div>
467<div class="literalblock">
468<div class="content">
469<pre><tt>&lt;full commit message&gt;</tt></pre>
470</div></div>
471</li>
472<li>
473<p>
474<em>email</em>
475</p>
476<div class="literalblock">
477<div class="content">
478<pre><tt>From &lt;sha1&gt; &lt;date&gt;
479From: &lt;author&gt;
480Date: &lt;date &amp; time&gt;
481Subject: [PATCH] &lt;title line&gt;</tt></pre>
482</div></div>
483<div class="literalblock">
484<div class="content">
485<pre><tt>&lt;full commit message&gt;</tt></pre>
486</div></div>
487</li>
488<li>
489<p>
490<em>raw</em>
491</p>
492<p>The <em>raw</em> format shows the entire commit exactly as
493stored in the commit object. Notably, the SHA1s are
494displayed in full, regardless of whether --abbrev or
495--no-abbrev are used, and <em>parents</em> information show the
496true parent commits, without taking grafts nor history
497simplification into account.</p>
498</li>
499<li>
500<p>
501<em>format:</em>
502</p>
503<p>The <em>format:</em> format allows you to specify which information
504you want to show. It works a little bit like printf format,
505with the notable exception that you get a newline with <em>%n</em>
506instead of <em>\n</em>.</p>
507<p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
508would show something like this:</p>
509<div class="listingblock">
510<div class="content">
511<pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
512The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;
513</tt></pre>
514</div></div>
515<p>The placeholders are:</p>
516<ul>
517<li>
518<p>
519<em>%H</em>: commit hash
520</p>
521</li>
522<li>
523<p>
524<em>%h</em>: abbreviated commit hash
525</p>
526</li>
527<li>
528<p>
529<em>%T</em>: tree hash
530</p>
531</li>
532<li>
533<p>
534<em>%t</em>: abbreviated tree hash
535</p>
536</li>
537<li>
538<p>
539<em>%P</em>: parent hashes
540</p>
541</li>
542<li>
543<p>
544<em>%p</em>: abbreviated parent hashes
545</p>
546</li>
547<li>
548<p>
549<em>%an</em>: author name
550</p>
551</li>
552<li>
553<p>
554<em>%ae</em>: author email
555</p>
556</li>
557<li>
558<p>
559<em>%ad</em>: author date
560</p>
561</li>
562<li>
563<p>
564<em>%aD</em>: author date, RFC2822 style
565</p>
566</li>
567<li>
568<p>
569<em>%ar</em>: author date, relative
570</p>
571</li>
572<li>
573<p>
574<em>%at</em>: author date, UNIX timestamp
575</p>
576</li>
577<li>
578<p>
579<em>%ai</em>: author date, ISO 8601 format
580</p>
581</li>
582<li>
583<p>
584<em>%cn</em>: committer name
585</p>
586</li>
587<li>
588<p>
589<em>%ce</em>: committer email
590</p>
591</li>
592<li>
593<p>
594<em>%cd</em>: committer date
595</p>
596</li>
597<li>
598<p>
599<em>%cD</em>: committer date, RFC2822 style
600</p>
601</li>
602<li>
603<p>
604<em>%cr</em>: committer date, relative
605</p>
606</li>
607<li>
608<p>
609<em>%ct</em>: committer date, UNIX timestamp
610</p>
611</li>
612<li>
613<p>
614<em>%ci</em>: committer date, ISO 8601 format
615</p>
616</li>
617<li>
618<p>
619<em>%e</em>: encoding
620</p>
621</li>
622<li>
623<p>
624<em>%s</em>: subject
625</p>
626</li>
627<li>
628<p>
629<em>%b</em>: body
630</p>
631</li>
632<li>
633<p>
634<em>%Cred</em>: switch color to red
635</p>
636</li>
637<li>
638<p>
639<em>%Cgreen</em>: switch color to green
640</p>
641</li>
642<li>
643<p>
644<em>%Cblue</em>: switch color to blue
645</p>
646</li>
647<li>
648<p>
649<em>%Creset</em>: reset color
650</p>
651</li>
652<li>
653<p>
654<em>%m</em>: left, right or boundary mark
655</p>
656</li>
657<li>
658<p>
659<em>%n</em>: newline
660</p>
661</li>
Junio C Hamanob78d2592008-04-09 09:39:08662<li>
663<p>
664<em>%x00</em>: print a byte from a hex code
665</p>
666</li>
Junio C Hamano86bcccc2008-03-08 09:33:55667</ul>
668</li>
Junio C Hamano6fb124c2008-06-13 10:04:01669<li>
670<p>
671<em>tformat:</em>
672</p>
673<p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
674provides "terminator" semantics instead of "separator" semantics. In
675other words, each commit has the message terminator character (usually a
676newline) appended, rather than a separator placed between entries.
677This means that the final entry of a single-line format will be properly
678terminated with a new line, just as the "oneline" format does.
679For example:</p>
680<div class="listingblock">
681<div class="content">
682<pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
683 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
6844da45be
6857134973 -- NO NEWLINE
686
687$ git log -2 --pretty=tformat:%h 4da45bef \
688 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
6894da45be
6907134973</tt></pre>
691</div></div>
692</li>
Junio C Hamano86bcccc2008-03-08 09:33:55693</ul>
694</div>
Junio C Hamano1a4e8412005-12-27 08:17:23695<h2>Examples</h2>
696<div class="sectionbody">
697<dl>
698<dt>
Junio C Hamanofce7c7e2008-07-02 03:06:38699git whatchanged -p v2.6.12.. include/scsi drivers/scsi
Junio C Hamano1a4e8412005-12-27 08:17:23700</dt>
701<dd>
702<p>
703 Show as patches the commits since version <em>v2.6.12</em> that changed
704 any file in the include/scsi or drivers/scsi subdirectories
705</p>
706</dd>
707<dt>
Junio C Hamanofce7c7e2008-07-02 03:06:38708git whatchanged --since="2 weeks ago" -- gitk
Junio C Hamano1a4e8412005-12-27 08:17:23709</dt>
710<dd>
711<p>
712 Show the changes during the last two weeks to the file <em>gitk</em>.
713 The "--" is necessary to avoid confusion with the <strong>branch</strong> named
714 <em>gitk</em>
715</p>
716</dd>
717</dl>
718</div>
719<h2>Author</h2>
720<div class="sectionbody">
721<p>Written by Linus Torvalds &lt;torvalds@osdl.org&gt; and
722Junio C Hamano &lt;junkio@cox.net&gt;</p>
723</div>
724<h2>Documentation</h2>
725<div class="sectionbody">
726<p>Documentation by David Greaves, Junio C Hamano and the git-list &lt;git@vger.kernel.org&gt;.</p>
727</div>
728<h2>GIT</h2>
729<div class="sectionbody">
Junio C Hamanof7c042d2008-06-06 22:50:53730<p>Part of the <a href="git.html">git(1)</a> suite</p>
Junio C Hamano1a4e8412005-12-27 08:17:23731</div>
732<div id="footer">
733<div id="footer-text">
Junio C Hamanofce7c7e2008-07-02 03:06:38734Last updated 02-Jul-2008 03:02:08 UTC
Junio C Hamano1a4e8412005-12-27 08:17:23735</div>
736</div>
737</body>
738</html>