Autogenerated HTML docs for v1.7.6-472-g4bfe7
[git/jnareb-git.git] / git-whatchanged.html
blob8e5cfd1ec16cd8e6fd867498aaac5e2190f92045
1 <!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" />
6 <meta name="generator" content="AsciiDoc 8.4.5" />
7 <title>git-whatchanged(1)</title>
8 <style type="text/css">
9 /* Debug borders */
10 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
12 border: 1px solid red;
16 body {
17 margin: 1em 5% 1em 5%;
20 a {
21 color: blue;
22 text-decoration: underline;
24 a:visited {
25 color: fuchsia;
28 em {
29 font-style: italic;
30 color: navy;
33 strong {
34 font-weight: bold;
35 color: #083194;
38 tt {
39 color: navy;
42 h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
50 h1, h2, h3 {
51 border-bottom: 2px solid silver;
53 h2 {
54 padding-top: 0.5em;
56 h3 {
57 float: left;
59 h3 + * {
60 clear: left;
63 div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
68 hr {
69 border: 1px solid silver;
72 p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
77 ul, ol, li > p {
78 margin-top: 0;
81 pre {
82 padding: 0;
83 margin: 0;
86 span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
90 font-size: 1.1em;
92 span#email {
94 span#revnumber, span#revdate, span#revremark {
95 font-family: sans-serif;
98 div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
105 div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
109 div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
114 div#preamble {
115 margin-top: 1.5em;
116 margin-bottom: 1.5em;
118 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120 div.admonitionblock {
121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
124 div.admonitionblock {
125 margin-top: 2.5em;
126 margin-bottom: 2.5em;
129 div.content { /* Block element content. */
130 padding: 0;
133 /* Block element titles. */
134 div.title, caption.title {
135 color: #527bbd;
136 font-family: sans-serif;
137 font-weight: bold;
138 text-align: left;
139 margin-top: 1.0em;
140 margin-bottom: 0.5em;
142 div.title + * {
143 margin-top: 0;
146 td div.title:first-child {
147 margin-top: 0.0em;
149 div.content div.title:first-child {
150 margin-top: 0.0em;
152 div.content + div.title {
153 margin-top: 0.0em;
156 div.sidebarblock > div.content {
157 background: #ffffee;
158 border: 1px solid silver;
159 padding: 0.5em;
162 div.listingblock > div.content {
163 border: 1px solid silver;
164 background: #f4f4f4;
165 padding: 0.5em;
168 div.quoteblock {
169 padding-left: 2.0em;
170 margin-right: 10%;
172 div.quoteblock > div.attribution {
173 padding-top: 0.5em;
174 text-align: right;
177 div.verseblock {
178 padding-left: 2.0em;
179 margin-right: 10%;
181 div.verseblock > div.content {
182 white-space: pre;
184 div.verseblock > div.attribution {
185 padding-top: 0.75em;
186 text-align: left;
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div.verseblock + div.attribution {
190 text-align: left;
193 div.admonitionblock .icon {
194 vertical-align: top;
195 font-size: 1.1em;
196 font-weight: bold;
197 text-decoration: underline;
198 color: #527bbd;
199 padding-right: 0.5em;
201 div.admonitionblock td.content {
202 padding-left: 0.5em;
203 border-left: 2px solid silver;
206 div.exampleblock > div.content {
207 border-left: 2px solid silver;
208 padding: 0.5em;
211 div.imageblock div.content { padding-left: 0; }
212 span.image img { border-style: none; }
213 a.image:visited { color: white; }
215 dl {
216 margin-top: 0.8em;
217 margin-bottom: 0.8em;
219 dt {
220 margin-top: 0.5em;
221 margin-bottom: 0;
222 font-style: normal;
223 color: navy;
225 dd > *:first-child {
226 margin-top: 0.1em;
229 ul, ol {
230 list-style-position: outside;
232 ol.arabic {
233 list-style-type: decimal;
235 ol.loweralpha {
236 list-style-type: lower-alpha;
238 ol.upperalpha {
239 list-style-type: upper-alpha;
241 ol.lowerroman {
242 list-style-type: lower-roman;
244 ol.upperroman {
245 list-style-type: upper-roman;
248 div.compact ul, div.compact ol,
249 div.compact p, div.compact p,
250 div.compact div, div.compact div {
251 margin-top: 0.1em;
252 margin-bottom: 0.1em;
255 div.tableblock > table {
256 border: 3px solid #527bbd;
258 thead {
259 font-family: sans-serif;
260 font-weight: bold;
262 tfoot {
263 font-weight: bold;
265 td > div.verse {
266 white-space: pre;
268 p.table {
269 margin-top: 0;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div.tableblock > table[frame="void"] {
273 border-style: none;
275 div.tableblock > table[frame="hsides"] {
276 border-left-style: none;
277 border-right-style: none;
279 div.tableblock > table[frame="vsides"] {
280 border-top-style: none;
281 border-bottom-style: none;
285 div.hdlist {
286 margin-top: 0.8em;
287 margin-bottom: 0.8em;
289 div.hdlist tr {
290 padding-bottom: 15px;
292 dt.hdlist1.strong, td.hdlist1.strong {
293 font-weight: bold;
295 td.hdlist1 {
296 vertical-align: top;
297 font-style: normal;
298 padding-right: 0.8em;
299 color: navy;
301 td.hdlist2 {
302 vertical-align: top;
304 div.hdlist.compact tr {
305 margin: 0;
306 padding-bottom: 0;
309 .comment {
310 background: yellow;
313 @media print {
314 div#footer-badges { display: none; }
317 div#toctitle {
318 color: #527bbd;
319 font-family: sans-serif;
320 font-size: 1.1em;
321 font-weight: bold;
322 margin-top: 1.0em;
323 margin-bottom: 0.1em;
326 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327 margin-top: 0;
328 margin-bottom: 0;
330 div.toclevel2 {
331 margin-left: 2em;
332 font-size: 0.9em;
334 div.toclevel3 {
335 margin-left: 4em;
336 font-size: 0.9em;
338 div.toclevel4 {
339 margin-left: 6em;
340 font-size: 0.9em;
342 /* Overrides for manpage documents */
343 h1 {
344 padding-top: 0.5em;
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver;
347 border-bottom: 2px solid silver;
349 h2 {
350 border-style: none;
352 div.sectionbody {
353 margin-left: 5%;
356 @media print {
357 div#toc { display: none; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div.sidebar-content {
363 background: #ffffee;
364 border: 1px solid silver;
365 padding: 0.5em;
367 div.sidebar-title, div.image-title {
368 color: #527bbd;
369 font-family: sans-serif;
370 font-weight: bold;
371 margin-top: 0.0em;
372 margin-bottom: 0.5em;
375 div.listingblock div.content {
376 border: 1px solid silver;
377 background: #f4f4f4;
378 padding: 0.5em;
381 div.quoteblock-attribution {
382 padding-top: 0.5em;
383 text-align: right;
386 div.verseblock-content {
387 white-space: pre;
389 div.verseblock-attribution {
390 padding-top: 0.75em;
391 text-align: left;
394 div.exampleblock-content {
395 border-left: 2px solid silver;
396 padding-left: 0.5em;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc a:visited { color: blue; }
401 </style>
402 </head>
403 <body>
404 <div id="header">
405 <h1>
406 git-whatchanged(1) Manual Page
407 </h1>
408 <h2>NAME</h2>
409 <div class="sectionbody">
410 <p>git-whatchanged -
411 Show logs with difference each commit introduces
412 </p>
413 </div>
414 </div>
415 <h2 id="_synopsis">SYNOPSIS</h2>
416 <div class="sectionbody">
417 <div class="verseblock">
418 <div class="verseblock-content"><em>git whatchanged</em> &lt;option&gt;&#8230;</div>
419 <div class="verseblock-attribution">
420 </div></div>
421 </div>
422 <h2 id="_description">DESCRIPTION</h2>
423 <div class="sectionbody">
424 <div class="paragraph"><p>Shows commit logs and diff output each commit introduces. The
425 command internally invokes <em>git rev-list</em> piped to
426 <em>git diff-tree</em>, and takes command line options for both of
427 these commands.</p></div>
428 <div class="paragraph"><p>This manual page describes only the most frequently used options.</p></div>
429 </div>
430 <h2 id="_options">OPTIONS</h2>
431 <div class="sectionbody">
432 <div class="dlist"><dl>
433 <dt class="hdlist1">
435 </dt>
436 <dd>
438 Show textual diffs, instead of the git internal diff
439 output format that is useful only to tell the changed
440 paths and their nature of changes.
441 </p>
442 </dd>
443 <dt class="hdlist1">
444 -&lt;n&gt;
445 </dt>
446 <dd>
448 Limit output to &lt;n&gt; commits.
449 </p>
450 </dd>
451 <dt class="hdlist1">
452 &lt;since&gt;..&lt;until&gt;
453 </dt>
454 <dd>
456 Limit output to between the two named commits (bottom
457 exclusive, top inclusive).
458 </p>
459 </dd>
460 <dt class="hdlist1">
462 </dt>
463 <dd>
465 Show git internal diff output, but for the whole tree,
466 not just the top level.
467 </p>
468 </dd>
469 <dt class="hdlist1">
471 </dt>
472 <dd>
474 By default, differences for merge commits are not shown.
475 With this flag, show differences to that commit from all
476 of its parents.
477 </p>
478 <div class="paragraph"><p>However, it is not very useful in general, although it
479 <strong>is</strong> useful on a file-by-file basis.</p></div>
480 </dd>
481 <dt class="hdlist1">
482 --pretty[=&lt;format&gt;]
483 </dt>
484 <dt class="hdlist1">
485 --format=&lt;format&gt;
486 </dt>
487 <dd>
489 Pretty-print the contents of the commit logs in a given format,
490 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
491 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
492 the "PRETTY FORMATS" section for some additional details for each
493 format. When omitted, the format defaults to <em>medium</em>.
494 </p>
495 <div class="paragraph"><p>Note: you can specify the default pretty format in the repository
496 configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
497 </dd>
498 <dt class="hdlist1">
499 --abbrev-commit
500 </dt>
501 <dd>
503 Instead of showing the full 40-byte hexadecimal commit object
504 name, show only a partial prefix. Non default number of
505 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
506 diff output, if it is displayed).
507 </p>
508 <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
509 people using 80-column terminals.</p></div>
510 </dd>
511 <dt class="hdlist1">
512 --no-abbrev-commit
513 </dt>
514 <dd>
516 Show the full 40-byte hexadecimal commit object name. This negates
517 <tt>--abbrev-commit</tt> and those options which imply it such as
518 "--oneline". It also overrides the <em>log.abbrevCommit</em> variable.
519 </p>
520 </dd>
521 <dt class="hdlist1">
522 --oneline
523 </dt>
524 <dd>
526 This is a shorthand for "--pretty=oneline --abbrev-commit"
527 used together.
528 </p>
529 </dd>
530 <dt class="hdlist1">
531 --encoding[=&lt;encoding&gt;]
532 </dt>
533 <dd>
535 The commit objects record the encoding used for the log message
536 in their encoding header; this option can be used to tell the
537 command to re-code the commit log message in the encoding
538 preferred by the user. For non plumbing commands this
539 defaults to UTF-8.
540 </p>
541 </dd>
542 <dt class="hdlist1">
543 --notes[=&lt;ref&gt;]
544 </dt>
545 <dd>
547 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
548 commit, when showing the commit log message. This is the default
549 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
550 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option given
551 on the command line.
552 </p>
553 <div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
554 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding
555 environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
556 <div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, show this notes ref instead of the
557 default notes ref(s). The ref is taken to be in <tt>refs/notes/</tt> if it
558 is not qualified.</p></div>
559 <div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
560 being displayed. Examples: "--notes=foo" will show only notes from
561 "refs/notes/foo"; "--notes=foo --notes" will show both notes from
562 "refs/notes/foo" and from the default notes ref(s).</p></div>
563 </dd>
564 <dt class="hdlist1">
565 --no-notes
566 </dt>
567 <dd>
569 Do not show notes. This negates the above <tt>--notes</tt> option, by
570 resetting the list of notes refs from which notes are shown.
571 Options are parsed in the order given on the command line, so e.g.
572 "--notes --notes=foo --no-notes --notes=bar" will only show notes
573 from "refs/notes/bar".
574 </p>
575 </dd>
576 <dt class="hdlist1">
577 --show-notes[=&lt;ref&gt;]
578 </dt>
579 <dt class="hdlist1">
580 --[no-]standard-notes
581 </dt>
582 <dd>
584 These options are deprecated. Use the above --notes/--no-notes
585 options instead.
586 </p>
587 </dd>
588 </dl></div>
589 </div>
590 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
591 <div class="sectionbody">
592 <div class="paragraph"><p>If the commit is a merge, and if the pretty-format
593 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
594 inserted before the <em>Author:</em> line. This line begins with
595 "Merge: " and the sha1s of ancestral commits are printed,
596 separated by spaces. Note that the listed commits may not
597 necessarily be the list of the <strong>direct</strong> parent commits if you
598 have limited your view of history: for example, if you are
599 only interested in changes related to a certain directory or
600 file.</p></div>
601 <div class="paragraph"><p>There are several built-in formats, and you can define
602 additional formats by setting a pretty.&lt;name&gt;
603 config option to either another format name, or a
604 <em>format:</em> string, as described below (see
605 <a href="git-config.html">git-config(1)</a>). Here are the details of the
606 built-in formats:</p></div>
607 <div class="ulist"><ul>
608 <li>
610 <em>oneline</em>
611 </p>
612 <div class="literalblock">
613 <div class="content">
614 <pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
615 </div></div>
616 <div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
617 </li>
618 <li>
620 <em>short</em>
621 </p>
622 <div class="literalblock">
623 <div class="content">
624 <pre><tt>commit &lt;sha1&gt;
625 Author: &lt;author&gt;</tt></pre>
626 </div></div>
627 <div class="literalblock">
628 <div class="content">
629 <pre><tt>&lt;title line&gt;</tt></pre>
630 </div></div>
631 </li>
632 <li>
634 <em>medium</em>
635 </p>
636 <div class="literalblock">
637 <div class="content">
638 <pre><tt>commit &lt;sha1&gt;
639 Author: &lt;author&gt;
640 Date: &lt;author date&gt;</tt></pre>
641 </div></div>
642 <div class="literalblock">
643 <div class="content">
644 <pre><tt>&lt;title line&gt;</tt></pre>
645 </div></div>
646 <div class="literalblock">
647 <div class="content">
648 <pre><tt>&lt;full commit message&gt;</tt></pre>
649 </div></div>
650 </li>
651 <li>
653 <em>full</em>
654 </p>
655 <div class="literalblock">
656 <div class="content">
657 <pre><tt>commit &lt;sha1&gt;
658 Author: &lt;author&gt;
659 Commit: &lt;committer&gt;</tt></pre>
660 </div></div>
661 <div class="literalblock">
662 <div class="content">
663 <pre><tt>&lt;title line&gt;</tt></pre>
664 </div></div>
665 <div class="literalblock">
666 <div class="content">
667 <pre><tt>&lt;full commit message&gt;</tt></pre>
668 </div></div>
669 </li>
670 <li>
672 <em>fuller</em>
673 </p>
674 <div class="literalblock">
675 <div class="content">
676 <pre><tt>commit &lt;sha1&gt;
677 Author: &lt;author&gt;
678 AuthorDate: &lt;author date&gt;
679 Commit: &lt;committer&gt;
680 CommitDate: &lt;committer date&gt;</tt></pre>
681 </div></div>
682 <div class="literalblock">
683 <div class="content">
684 <pre><tt>&lt;title line&gt;</tt></pre>
685 </div></div>
686 <div class="literalblock">
687 <div class="content">
688 <pre><tt>&lt;full commit message&gt;</tt></pre>
689 </div></div>
690 </li>
691 <li>
693 <em>email</em>
694 </p>
695 <div class="literalblock">
696 <div class="content">
697 <pre><tt>From &lt;sha1&gt; &lt;date&gt;
698 From: &lt;author&gt;
699 Date: &lt;author date&gt;
700 Subject: [PATCH] &lt;title line&gt;</tt></pre>
701 </div></div>
702 <div class="literalblock">
703 <div class="content">
704 <pre><tt>&lt;full commit message&gt;</tt></pre>
705 </div></div>
706 </li>
707 <li>
709 <em>raw</em>
710 </p>
711 <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
712 stored in the commit object. Notably, the SHA1s are
713 displayed in full, regardless of whether --abbrev or
714 --no-abbrev are used, and <em>parents</em> information show the
715 true parent commits, without taking grafts nor history
716 simplification into account.</p></div>
717 </li>
718 <li>
720 <em>format:&lt;string&gt;</em>
721 </p>
722 <div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
723 you want to show. It works a little bit like printf format,
724 with the notable exception that you get a newline with <em>%n</em>
725 instead of <em>\n</em>.</p></div>
726 <div class="paragraph"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
727 would show something like this:</p></div>
728 <div class="listingblock">
729 <div class="content">
730 <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
731 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</tt></pre>
732 </div></div>
733 <div class="paragraph"><p>The placeholders are:</p></div>
734 <div class="ulist"><ul>
735 <li>
737 <em>%H</em>: commit hash
738 </p>
739 </li>
740 <li>
742 <em>%h</em>: abbreviated commit hash
743 </p>
744 </li>
745 <li>
747 <em>%T</em>: tree hash
748 </p>
749 </li>
750 <li>
752 <em>%t</em>: abbreviated tree hash
753 </p>
754 </li>
755 <li>
757 <em>%P</em>: parent hashes
758 </p>
759 </li>
760 <li>
762 <em>%p</em>: abbreviated parent hashes
763 </p>
764 </li>
765 <li>
767 <em>%an</em>: author name
768 </p>
769 </li>
770 <li>
772 <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>)
773 </p>
774 </li>
775 <li>
777 <em>%ae</em>: author email
778 </p>
779 </li>
780 <li>
782 <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>)
783 </p>
784 </li>
785 <li>
787 <em>%ad</em>: author date (format respects --date= option)
788 </p>
789 </li>
790 <li>
792 <em>%aD</em>: author date, RFC2822 style
793 </p>
794 </li>
795 <li>
797 <em>%ar</em>: author date, relative
798 </p>
799 </li>
800 <li>
802 <em>%at</em>: author date, UNIX timestamp
803 </p>
804 </li>
805 <li>
807 <em>%ai</em>: author date, ISO 8601 format
808 </p>
809 </li>
810 <li>
812 <em>%cn</em>: committer name
813 </p>
814 </li>
815 <li>
817 <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>)
818 </p>
819 </li>
820 <li>
822 <em>%ce</em>: committer email
823 </p>
824 </li>
825 <li>
827 <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>)
828 </p>
829 </li>
830 <li>
832 <em>%cd</em>: committer date
833 </p>
834 </li>
835 <li>
837 <em>%cD</em>: committer date, RFC2822 style
838 </p>
839 </li>
840 <li>
842 <em>%cr</em>: committer date, relative
843 </p>
844 </li>
845 <li>
847 <em>%ct</em>: committer date, UNIX timestamp
848 </p>
849 </li>
850 <li>
852 <em>%ci</em>: committer date, ISO 8601 format
853 </p>
854 </li>
855 <li>
857 <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
858 </p>
859 </li>
860 <li>
862 <em>%e</em>: encoding
863 </p>
864 </li>
865 <li>
867 <em>%s</em>: subject
868 </p>
869 </li>
870 <li>
872 <em>%f</em>: sanitized subject line, suitable for a filename
873 </p>
874 </li>
875 <li>
877 <em>%b</em>: body
878 </p>
879 </li>
880 <li>
882 <em>%B</em>: raw body (unwrapped subject and body)
883 </p>
884 </li>
885 <li>
887 <em>%N</em>: commit notes
888 </p>
889 </li>
890 <li>
892 <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
893 </p>
894 </li>
895 <li>
897 <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
898 </p>
899 </li>
900 <li>
902 <em>%gs</em>: reflog subject
903 </p>
904 </li>
905 <li>
907 <em>%Cred</em>: switch color to red
908 </p>
909 </li>
910 <li>
912 <em>%Cgreen</em>: switch color to green
913 </p>
914 </li>
915 <li>
917 <em>%Cblue</em>: switch color to blue
918 </p>
919 </li>
920 <li>
922 <em>%Creset</em>: reset color
923 </p>
924 </li>
925 <li>
927 <em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
928 </p>
929 </li>
930 <li>
932 <em>%m</em>: left, right or boundary mark
933 </p>
934 </li>
935 <li>
937 <em>%n</em>: newline
938 </p>
939 </li>
940 <li>
942 <em>%%</em>: a raw <em>%</em>
943 </p>
944 </li>
945 <li>
947 <em>%x00</em>: print a byte from a hex code
948 </p>
949 </li>
950 <li>
952 <em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
953 <a href="git-shortlog.html">git-shortlog(1)</a>.
954 </p>
955 </li>
956 </ul></div>
957 </li>
958 </ul></div>
959 <div class="admonitionblock">
960 <table><tr>
961 <td class="icon">
962 <div class="title">Note</div>
963 </td>
964 <td class="content">Some placeholders may depend on other options given to the
965 revision traversal engine. For example, the <tt>%g*</tt> reflog options will
966 insert an empty string unless we are traversing reflog entries (e.g., by
967 <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
968 format if <tt>--decorate</tt> was not already provided on the command line.</td>
969 </tr></table>
970 </div>
971 <div class="paragraph"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
972 is inserted immediately before the expansion if and only if the
973 placeholder expands to a non-empty string.</p></div>
974 <div class="paragraph"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
975 immediately precede the expansion are deleted if and only if the
976 placeholder expands to an empty string.</p></div>
977 <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
978 is inserted immediately before the expansion if and only if the
979 placeholder expands to a non-empty string.</p></div>
980 <div class="ulist"><ul>
981 <li>
983 <em>tformat:</em>
984 </p>
985 <div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
986 provides "terminator" semantics instead of "separator" semantics. In
987 other words, each commit has the message terminator character (usually a
988 newline) appended, rather than a separator placed between entries.
989 This means that the final entry of a single-line format will be properly
990 terminated with a new line, just as the "oneline" format does.
991 For example:</p></div>
992 <div class="listingblock">
993 <div class="content">
994 <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
995 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
996 4da45be
997 7134973 -- NO NEWLINE
999 $ git log -2 --pretty=tformat:%h 4da45bef \
1000 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1001 4da45be
1002 7134973</tt></pre>
1003 </div></div>
1004 <div class="paragraph"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
1005 as if it has <tt>tformat:</tt> in front of it. For example, these two are
1006 equivalent:</p></div>
1007 <div class="listingblock">
1008 <div class="content">
1009 <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
1010 $ git log -2 --pretty=%h 4da45bef</tt></pre>
1011 </div></div>
1012 </li>
1013 </ul></div>
1014 </div>
1015 <h2 id="_examples">Examples</h2>
1016 <div class="sectionbody">
1017 <div class="dlist"><dl>
1018 <dt class="hdlist1">
1019 <tt>git whatchanged -p v2.6.12.. include/scsi drivers/scsi</tt>
1020 </dt>
1021 <dd>
1023 Show as patches the commits since version <em>v2.6.12</em> that changed
1024 any file in the include/scsi or drivers/scsi subdirectories
1025 </p>
1026 </dd>
1027 <dt class="hdlist1">
1028 <tt>git whatchanged --since="2 weeks ago" -- gitk</tt>
1029 </dt>
1030 <dd>
1032 Show the changes during the last two weeks to the file <em>gitk</em>.
1033 The "--" is necessary to avoid confusion with the <strong>branch</strong> named
1034 <em>gitk</em>
1035 </p>
1036 </dd>
1037 </dl></div>
1038 </div>
1039 <h2 id="_git">GIT</h2>
1040 <div class="sectionbody">
1041 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
1042 </div>
1043 <div id="footer">
1044 <div id="footer-text">
1045 Last updated 2011-08-05 00:04:52 UTC
1046 </div>
1047 </div>
1048 </body>
1049 </html>