Autogenerated HTML docs for v1.7.6-rc1
[git/jnareb-git.git] / git-whatchanged.html
blob114af7c7f44e9f22c7f2c01bae68e0b87f7dc48b
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="paragraph"><p><em>git whatchanged</em> &lt;option&gt;&#8230;</p></div>
418 </div>
419 <h2 id="_description">DESCRIPTION</h2>
420 <div class="sectionbody">
421 <div class="paragraph"><p>Shows commit logs and diff output each commit introduces. The
422 command internally invokes <em>git rev-list</em> piped to
423 <em>git diff-tree</em>, and takes command line options for both of
424 these commands.</p></div>
425 <div class="paragraph"><p>This manual page describes only the most frequently used options.</p></div>
426 </div>
427 <h2 id="_options">OPTIONS</h2>
428 <div class="sectionbody">
429 <div class="dlist"><dl>
430 <dt class="hdlist1">
432 </dt>
433 <dd>
435 Show textual diffs, instead of the git internal diff
436 output format that is useful only to tell the changed
437 paths and their nature of changes.
438 </p>
439 </dd>
440 <dt class="hdlist1">
441 -&lt;n&gt;
442 </dt>
443 <dd>
445 Limit output to &lt;n&gt; commits.
446 </p>
447 </dd>
448 <dt class="hdlist1">
449 &lt;since&gt;..&lt;until&gt;
450 </dt>
451 <dd>
453 Limit output to between the two named commits (bottom
454 exclusive, top inclusive).
455 </p>
456 </dd>
457 <dt class="hdlist1">
459 </dt>
460 <dd>
462 Show git internal diff output, but for the whole tree,
463 not just the top level.
464 </p>
465 </dd>
466 <dt class="hdlist1">
468 </dt>
469 <dd>
471 By default, differences for merge commits are not shown.
472 With this flag, show differences to that commit from all
473 of its parents.
474 </p>
475 <div class="paragraph"><p>However, it is not very useful in general, although it
476 <strong>is</strong> useful on a file-by-file basis.</p></div>
477 </dd>
478 <dt class="hdlist1">
479 --pretty[=&lt;format&gt;]
480 </dt>
481 <dt class="hdlist1">
482 --format=&lt;format&gt;
483 </dt>
484 <dd>
486 Pretty-print the contents of the commit logs in a given format,
487 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
488 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
489 the "PRETTY FORMATS" section for some additional details for each
490 format. When omitted, the format defaults to <em>medium</em>.
491 </p>
492 <div class="paragraph"><p>Note: you can specify the default pretty format in the repository
493 configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
494 </dd>
495 <dt class="hdlist1">
496 --abbrev-commit
497 </dt>
498 <dd>
500 Instead of showing the full 40-byte hexadecimal commit object
501 name, show only a partial prefix. Non default number of
502 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
503 diff output, if it is displayed).
504 </p>
505 <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
506 people using 80-column terminals.</p></div>
507 </dd>
508 <dt class="hdlist1">
509 --no-abbrev-commit
510 </dt>
511 <dd>
513 Show the full 40-byte hexadecimal commit object name. This negates
514 <tt>--abbrev-commit</tt> and those options which imply it such as
515 "--oneline". It also overrides the <em>log.abbrevCommit</em> variable.
516 </p>
517 </dd>
518 <dt class="hdlist1">
519 --oneline
520 </dt>
521 <dd>
523 This is a shorthand for "--pretty=oneline --abbrev-commit"
524 used together.
525 </p>
526 </dd>
527 <dt class="hdlist1">
528 --encoding[=&lt;encoding&gt;]
529 </dt>
530 <dd>
532 The commit objects record the encoding used for the log message
533 in their encoding header; this option can be used to tell the
534 command to re-code the commit log message in the encoding
535 preferred by the user. For non plumbing commands this
536 defaults to UTF-8.
537 </p>
538 </dd>
539 <dt class="hdlist1">
540 --notes[=&lt;ref&gt;]
541 </dt>
542 <dd>
544 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
545 commit, when showing the commit log message. This is the default
546 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
547 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option given
548 on the command line.
549 </p>
550 <div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
551 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding
552 environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
553 <div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, show this notes ref instead of the
554 default notes ref(s). The ref is taken to be in <tt>refs/notes/</tt> if it
555 is not qualified.</p></div>
556 <div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
557 being displayed. Examples: "--notes=foo" will show only notes from
558 "refs/notes/foo"; "--notes=foo --notes" will show both notes from
559 "refs/notes/foo" and from the default notes ref(s).</p></div>
560 </dd>
561 <dt class="hdlist1">
562 --no-notes
563 </dt>
564 <dd>
566 Do not show notes. This negates the above <tt>--notes</tt> option, by
567 resetting the list of notes refs from which notes are shown.
568 Options are parsed in the order given on the command line, so e.g.
569 "--notes --notes=foo --no-notes --notes=bar" will only show notes
570 from "refs/notes/bar".
571 </p>
572 </dd>
573 <dt class="hdlist1">
574 --show-notes[=&lt;ref&gt;]
575 </dt>
576 <dt class="hdlist1">
577 --[no-]standard-notes
578 </dt>
579 <dd>
581 These options are deprecated. Use the above --notes/--no-notes
582 options instead.
583 </p>
584 </dd>
585 </dl></div>
586 </div>
587 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
588 <div class="sectionbody">
589 <div class="paragraph"><p>If the commit is a merge, and if the pretty-format
590 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
591 inserted before the <em>Author:</em> line. This line begins with
592 "Merge: " and the sha1s of ancestral commits are printed,
593 separated by spaces. Note that the listed commits may not
594 necessarily be the list of the <strong>direct</strong> parent commits if you
595 have limited your view of history: for example, if you are
596 only interested in changes related to a certain directory or
597 file.</p></div>
598 <div class="paragraph"><p>There are several built-in formats, and you can define
599 additional formats by setting a pretty.&lt;name&gt;
600 config option to either another format name, or a
601 <em>format:</em> string, as described below (see
602 <a href="git-config.html">git-config(1)</a>). Here are the details of the
603 built-in formats:</p></div>
604 <div class="ulist"><ul>
605 <li>
607 <em>oneline</em>
608 </p>
609 <div class="literalblock">
610 <div class="content">
611 <pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
612 </div></div>
613 <div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
614 </li>
615 <li>
617 <em>short</em>
618 </p>
619 <div class="literalblock">
620 <div class="content">
621 <pre><tt>commit &lt;sha1&gt;
622 Author: &lt;author&gt;</tt></pre>
623 </div></div>
624 <div class="literalblock">
625 <div class="content">
626 <pre><tt>&lt;title line&gt;</tt></pre>
627 </div></div>
628 </li>
629 <li>
631 <em>medium</em>
632 </p>
633 <div class="literalblock">
634 <div class="content">
635 <pre><tt>commit &lt;sha1&gt;
636 Author: &lt;author&gt;
637 Date: &lt;author date&gt;</tt></pre>
638 </div></div>
639 <div class="literalblock">
640 <div class="content">
641 <pre><tt>&lt;title line&gt;</tt></pre>
642 </div></div>
643 <div class="literalblock">
644 <div class="content">
645 <pre><tt>&lt;full commit message&gt;</tt></pre>
646 </div></div>
647 </li>
648 <li>
650 <em>full</em>
651 </p>
652 <div class="literalblock">
653 <div class="content">
654 <pre><tt>commit &lt;sha1&gt;
655 Author: &lt;author&gt;
656 Commit: &lt;committer&gt;</tt></pre>
657 </div></div>
658 <div class="literalblock">
659 <div class="content">
660 <pre><tt>&lt;title line&gt;</tt></pre>
661 </div></div>
662 <div class="literalblock">
663 <div class="content">
664 <pre><tt>&lt;full commit message&gt;</tt></pre>
665 </div></div>
666 </li>
667 <li>
669 <em>fuller</em>
670 </p>
671 <div class="literalblock">
672 <div class="content">
673 <pre><tt>commit &lt;sha1&gt;
674 Author: &lt;author&gt;
675 AuthorDate: &lt;author date&gt;
676 Commit: &lt;committer&gt;
677 CommitDate: &lt;committer date&gt;</tt></pre>
678 </div></div>
679 <div class="literalblock">
680 <div class="content">
681 <pre><tt>&lt;title line&gt;</tt></pre>
682 </div></div>
683 <div class="literalblock">
684 <div class="content">
685 <pre><tt>&lt;full commit message&gt;</tt></pre>
686 </div></div>
687 </li>
688 <li>
690 <em>email</em>
691 </p>
692 <div class="literalblock">
693 <div class="content">
694 <pre><tt>From &lt;sha1&gt; &lt;date&gt;
695 From: &lt;author&gt;
696 Date: &lt;author date&gt;
697 Subject: [PATCH] &lt;title line&gt;</tt></pre>
698 </div></div>
699 <div class="literalblock">
700 <div class="content">
701 <pre><tt>&lt;full commit message&gt;</tt></pre>
702 </div></div>
703 </li>
704 <li>
706 <em>raw</em>
707 </p>
708 <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
709 stored in the commit object. Notably, the SHA1s are
710 displayed in full, regardless of whether --abbrev or
711 --no-abbrev are used, and <em>parents</em> information show the
712 true parent commits, without taking grafts nor history
713 simplification into account.</p></div>
714 </li>
715 <li>
717 <em>format:&lt;string&gt;</em>
718 </p>
719 <div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
720 you want to show. It works a little bit like printf format,
721 with the notable exception that you get a newline with <em>%n</em>
722 instead of <em>\n</em>.</p></div>
723 <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>
724 would show something like this:</p></div>
725 <div class="listingblock">
726 <div class="content">
727 <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
728 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</tt></pre>
729 </div></div>
730 <div class="paragraph"><p>The placeholders are:</p></div>
731 <div class="ulist"><ul>
732 <li>
734 <em>%H</em>: commit hash
735 </p>
736 </li>
737 <li>
739 <em>%h</em>: abbreviated commit hash
740 </p>
741 </li>
742 <li>
744 <em>%T</em>: tree hash
745 </p>
746 </li>
747 <li>
749 <em>%t</em>: abbreviated tree hash
750 </p>
751 </li>
752 <li>
754 <em>%P</em>: parent hashes
755 </p>
756 </li>
757 <li>
759 <em>%p</em>: abbreviated parent hashes
760 </p>
761 </li>
762 <li>
764 <em>%an</em>: author name
765 </p>
766 </li>
767 <li>
769 <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>)
770 </p>
771 </li>
772 <li>
774 <em>%ae</em>: author email
775 </p>
776 </li>
777 <li>
779 <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>)
780 </p>
781 </li>
782 <li>
784 <em>%ad</em>: author date (format respects --date= option)
785 </p>
786 </li>
787 <li>
789 <em>%aD</em>: author date, RFC2822 style
790 </p>
791 </li>
792 <li>
794 <em>%ar</em>: author date, relative
795 </p>
796 </li>
797 <li>
799 <em>%at</em>: author date, UNIX timestamp
800 </p>
801 </li>
802 <li>
804 <em>%ai</em>: author date, ISO 8601 format
805 </p>
806 </li>
807 <li>
809 <em>%cn</em>: committer name
810 </p>
811 </li>
812 <li>
814 <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>)
815 </p>
816 </li>
817 <li>
819 <em>%ce</em>: committer email
820 </p>
821 </li>
822 <li>
824 <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>)
825 </p>
826 </li>
827 <li>
829 <em>%cd</em>: committer date
830 </p>
831 </li>
832 <li>
834 <em>%cD</em>: committer date, RFC2822 style
835 </p>
836 </li>
837 <li>
839 <em>%cr</em>: committer date, relative
840 </p>
841 </li>
842 <li>
844 <em>%ct</em>: committer date, UNIX timestamp
845 </p>
846 </li>
847 <li>
849 <em>%ci</em>: committer date, ISO 8601 format
850 </p>
851 </li>
852 <li>
854 <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
855 </p>
856 </li>
857 <li>
859 <em>%e</em>: encoding
860 </p>
861 </li>
862 <li>
864 <em>%s</em>: subject
865 </p>
866 </li>
867 <li>
869 <em>%f</em>: sanitized subject line, suitable for a filename
870 </p>
871 </li>
872 <li>
874 <em>%b</em>: body
875 </p>
876 </li>
877 <li>
879 <em>%B</em>: raw body (unwrapped subject and body)
880 </p>
881 </li>
882 <li>
884 <em>%N</em>: commit notes
885 </p>
886 </li>
887 <li>
889 <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
890 </p>
891 </li>
892 <li>
894 <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
895 </p>
896 </li>
897 <li>
899 <em>%gs</em>: reflog subject
900 </p>
901 </li>
902 <li>
904 <em>%Cred</em>: switch color to red
905 </p>
906 </li>
907 <li>
909 <em>%Cgreen</em>: switch color to green
910 </p>
911 </li>
912 <li>
914 <em>%Cblue</em>: switch color to blue
915 </p>
916 </li>
917 <li>
919 <em>%Creset</em>: reset color
920 </p>
921 </li>
922 <li>
924 <em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
925 </p>
926 </li>
927 <li>
929 <em>%m</em>: left, right or boundary mark
930 </p>
931 </li>
932 <li>
934 <em>%n</em>: newline
935 </p>
936 </li>
937 <li>
939 <em>%%</em>: a raw <em>%</em>
940 </p>
941 </li>
942 <li>
944 <em>%x00</em>: print a byte from a hex code
945 </p>
946 </li>
947 <li>
949 <em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
950 <a href="git-shortlog.html">git-shortlog(1)</a>.
951 </p>
952 </li>
953 </ul></div>
954 </li>
955 </ul></div>
956 <div class="admonitionblock">
957 <table><tr>
958 <td class="icon">
959 <div class="title">Note</div>
960 </td>
961 <td class="content">Some placeholders may depend on other options given to the
962 revision traversal engine. For example, the <tt>%g*</tt> reflog options will
963 insert an empty string unless we are traversing reflog entries (e.g., by
964 <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
965 format if <tt>--decorate</tt> was not already provided on the command line.</td>
966 </tr></table>
967 </div>
968 <div class="paragraph"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
969 is inserted immediately before the expansion if and only if the
970 placeholder expands to a non-empty string.</p></div>
971 <div class="paragraph"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
972 immediately precede the expansion are deleted if and only if the
973 placeholder expands to an empty string.</p></div>
974 <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
975 is inserted immediately before the expansion if and only if the
976 placeholder expands to a non-empty string.</p></div>
977 <div class="ulist"><ul>
978 <li>
980 <em>tformat:</em>
981 </p>
982 <div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
983 provides "terminator" semantics instead of "separator" semantics. In
984 other words, each commit has the message terminator character (usually a
985 newline) appended, rather than a separator placed between entries.
986 This means that the final entry of a single-line format will be properly
987 terminated with a new line, just as the "oneline" format does.
988 For example:</p></div>
989 <div class="listingblock">
990 <div class="content">
991 <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
992 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
993 4da45be
994 7134973 -- NO NEWLINE
996 $ git log -2 --pretty=tformat:%h 4da45bef \
997 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
998 4da45be
999 7134973</tt></pre>
1000 </div></div>
1001 <div class="paragraph"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
1002 as if it has <tt>tformat:</tt> in front of it. For example, these two are
1003 equivalent:</p></div>
1004 <div class="listingblock">
1005 <div class="content">
1006 <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
1007 $ git log -2 --pretty=%h 4da45bef</tt></pre>
1008 </div></div>
1009 </li>
1010 </ul></div>
1011 </div>
1012 <h2 id="_examples">Examples</h2>
1013 <div class="sectionbody">
1014 <div class="dlist"><dl>
1015 <dt class="hdlist1">
1016 git whatchanged -p v2.6.12.. include/scsi drivers/scsi
1017 </dt>
1018 <dd>
1020 Show as patches the commits since version <em>v2.6.12</em> that changed
1021 any file in the include/scsi or drivers/scsi subdirectories
1022 </p>
1023 </dd>
1024 <dt class="hdlist1">
1025 git whatchanged --since="2 weeks ago" -- gitk
1026 </dt>
1027 <dd>
1029 Show the changes during the last two weeks to the file <em>gitk</em>.
1030 The "--" is necessary to avoid confusion with the <strong>branch</strong> named
1031 <em>gitk</em>
1032 </p>
1033 </dd>
1034 </dl></div>
1035 </div>
1036 <h2 id="_git">GIT</h2>
1037 <div class="sectionbody">
1038 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
1039 </div>
1040 <div id="footer">
1041 <div id="footer-text">
1042 Last updated 2011-03-15 23:30:15 UTC
1043 </div>
1044 </div>
1045 </body>
1046 </html>