Autogenerated HTML docs for v1.7.7-325-g05f6ed
[git/jnareb-git.git] / git-rev-list.html
blob8989158cf326b98c7333317fad804dc08aa184b5
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.5.2" />
7 <title>git-rev-list(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.0em;
122 margin-bottom: 1.5em;
124 div.admonitionblock {
125 margin-top: 2.0em;
126 margin-bottom: 2.0em;
127 margin-right: 10%;
128 color: #606060;
131 div.content { /* Block element content. */
132 padding: 0;
135 /* Block element titles. */
136 div.title, caption.title {
137 color: #527bbd;
138 font-family: sans-serif;
139 font-weight: bold;
140 text-align: left;
141 margin-top: 1.0em;
142 margin-bottom: 0.5em;
144 div.title + * {
145 margin-top: 0;
148 td div.title:first-child {
149 margin-top: 0.0em;
151 div.content div.title:first-child {
152 margin-top: 0.0em;
154 div.content + div.title {
155 margin-top: 0.0em;
158 div.sidebarblock > div.content {
159 background: #ffffee;
160 border: 1px solid silver;
161 padding: 0.5em;
164 div.listingblock > div.content {
165 border: 1px solid silver;
166 background: #f4f4f4;
167 padding: 0.5em;
170 div.quoteblock, div.verseblock {
171 padding-left: 1.0em;
172 margin-left: 1.0em;
173 margin-right: 10%;
174 border-left: 5px solid #dddddd;
175 color: #777777;
178 div.quoteblock > div.attribution {
179 padding-top: 0.5em;
180 text-align: right;
183 div.verseblock > div.content {
184 white-space: pre;
186 div.verseblock > div.attribution {
187 padding-top: 0.75em;
188 text-align: left;
190 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
191 div.verseblock + div.attribution {
192 text-align: left;
195 div.admonitionblock .icon {
196 vertical-align: top;
197 font-size: 1.1em;
198 font-weight: bold;
199 text-decoration: underline;
200 color: #527bbd;
201 padding-right: 0.5em;
203 div.admonitionblock td.content {
204 padding-left: 0.5em;
205 border-left: 3px solid #dddddd;
208 div.exampleblock > div.content {
209 border-left: 3px solid #dddddd;
210 padding-left: 0.5em;
213 div.imageblock div.content { padding-left: 0; }
214 span.image img { border-style: none; }
215 a.image:visited { color: white; }
217 dl {
218 margin-top: 0.8em;
219 margin-bottom: 0.8em;
221 dt {
222 margin-top: 0.5em;
223 margin-bottom: 0;
224 font-style: normal;
225 color: navy;
227 dd > *:first-child {
228 margin-top: 0.1em;
231 ul, ol {
232 list-style-position: outside;
234 ol.arabic {
235 list-style-type: decimal;
237 ol.loweralpha {
238 list-style-type: lower-alpha;
240 ol.upperalpha {
241 list-style-type: upper-alpha;
243 ol.lowerroman {
244 list-style-type: lower-roman;
246 ol.upperroman {
247 list-style-type: upper-roman;
250 div.compact ul, div.compact ol,
251 div.compact p, div.compact p,
252 div.compact div, div.compact div {
253 margin-top: 0.1em;
254 margin-bottom: 0.1em;
257 div.tableblock > table {
258 border: 3px solid #527bbd;
260 thead, p.table.header {
261 font-family: sans-serif;
262 font-weight: bold;
264 tfoot {
265 font-weight: bold;
267 td > div.verse {
268 white-space: pre;
270 p.table {
271 margin-top: 0;
273 /* Because the table frame attribute is overriden by CSS in most browsers. */
274 div.tableblock > table[frame="void"] {
275 border-style: none;
277 div.tableblock > table[frame="hsides"] {
278 border-left-style: none;
279 border-right-style: none;
281 div.tableblock > table[frame="vsides"] {
282 border-top-style: none;
283 border-bottom-style: none;
287 div.hdlist {
288 margin-top: 0.8em;
289 margin-bottom: 0.8em;
291 div.hdlist tr {
292 padding-bottom: 15px;
294 dt.hdlist1.strong, td.hdlist1.strong {
295 font-weight: bold;
297 td.hdlist1 {
298 vertical-align: top;
299 font-style: normal;
300 padding-right: 0.8em;
301 color: navy;
303 td.hdlist2 {
304 vertical-align: top;
306 div.hdlist.compact tr {
307 margin: 0;
308 padding-bottom: 0;
311 .comment {
312 background: yellow;
315 .footnote, .footnoteref {
316 font-size: 0.8em;
319 span.footnote, span.footnoteref {
320 vertical-align: super;
323 #footnotes {
324 margin: 20px 0 20px 0;
325 padding: 7px 0 0 0;
328 #footnotes div.footnote {
329 margin: 0 0 5px 0;
332 #footnotes hr {
333 border: none;
334 border-top: 1px solid silver;
335 height: 1px;
336 text-align: left;
337 margin-left: 0;
338 width: 20%;
339 min-width: 100px;
343 @media print {
344 div#footer-badges { display: none; }
347 div#toc {
348 margin-bottom: 2.5em;
351 div#toctitle {
352 color: #527bbd;
353 font-family: sans-serif;
354 font-size: 1.1em;
355 font-weight: bold;
356 margin-top: 1.0em;
357 margin-bottom: 0.1em;
360 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
361 margin-top: 0;
362 margin-bottom: 0;
364 div.toclevel2 {
365 margin-left: 2em;
366 font-size: 0.9em;
368 div.toclevel3 {
369 margin-left: 4em;
370 font-size: 0.9em;
372 div.toclevel4 {
373 margin-left: 6em;
374 font-size: 0.9em;
376 /* Overrides for manpage documents */
377 h1 {
378 padding-top: 0.5em;
379 padding-bottom: 0.5em;
380 border-top: 2px solid silver;
381 border-bottom: 2px solid silver;
383 h2 {
384 border-style: none;
386 div.sectionbody {
387 margin-left: 5%;
390 @media print {
391 div#toc { display: none; }
394 /* Workarounds for IE6's broken and incomplete CSS2. */
396 div.sidebar-content {
397 background: #ffffee;
398 border: 1px solid silver;
399 padding: 0.5em;
401 div.sidebar-title, div.image-title {
402 color: #527bbd;
403 font-family: sans-serif;
404 font-weight: bold;
405 margin-top: 0.0em;
406 margin-bottom: 0.5em;
409 div.listingblock div.content {
410 border: 1px solid silver;
411 background: #f4f4f4;
412 padding: 0.5em;
415 div.quoteblock-attribution {
416 padding-top: 0.5em;
417 text-align: right;
420 div.verseblock-content {
421 white-space: pre;
423 div.verseblock-attribution {
424 padding-top: 0.75em;
425 text-align: left;
428 div.exampleblock-content {
429 border-left: 3px solid #dddddd;
430 padding-left: 0.5em;
433 /* IE6 sets dynamically generated links as visited. */
434 div#toc a:visited { color: blue; }
435 </style>
436 <script type="text/javascript">
437 /*<![CDATA[*/
438 window.onload = function(){asciidoc.footnotes();}
439 var asciidoc = { // Namespace.
441 /////////////////////////////////////////////////////////////////////
442 // Table Of Contents generator
443 /////////////////////////////////////////////////////////////////////
445 /* Author: Mihai Bazon, September 2002
446 * http://students.infoiasi.ro/~mishoo
448 * Table Of Content generator
449 * Version: 0.4
451 * Feel free to use this script under the terms of the GNU General Public
452 * License, as long as you do not remove or alter this notice.
455 /* modified by Troy D. Hanson, September 2006. License: GPL */
456 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
458 // toclevels = 1..4.
459 toc: function (toclevels) {
461 function getText(el) {
462 var text = "";
463 for (var i = el.firstChild; i != null; i = i.nextSibling) {
464 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
465 text += i.data;
466 else if (i.firstChild != null)
467 text += getText(i);
469 return text;
472 function TocEntry(el, text, toclevel) {
473 this.element = el;
474 this.text = text;
475 this.toclevel = toclevel;
478 function tocEntries(el, toclevels) {
479 var result = new Array;
480 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
481 // Function that scans the DOM tree for header elements (the DOM2
482 // nodeIterator API would be a better technique but not supported by all
483 // browsers).
484 var iterate = function (el) {
485 for (var i = el.firstChild; i != null; i = i.nextSibling) {
486 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
487 var mo = re.exec(i.tagName);
488 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
489 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
491 iterate(i);
495 iterate(el);
496 return result;
499 var toc = document.getElementById("toc");
500 var entries = tocEntries(document.getElementById("content"), toclevels);
501 for (var i = 0; i < entries.length; ++i) {
502 var entry = entries[i];
503 if (entry.element.id == "")
504 entry.element.id = "_toc_" + i;
505 var a = document.createElement("a");
506 a.href = "#" + entry.element.id;
507 a.appendChild(document.createTextNode(entry.text));
508 var div = document.createElement("div");
509 div.appendChild(a);
510 div.className = "toclevel" + entry.toclevel;
511 toc.appendChild(div);
513 if (entries.length == 0)
514 toc.parentNode.removeChild(toc);
518 /////////////////////////////////////////////////////////////////////
519 // Footnotes generator
520 /////////////////////////////////////////////////////////////////////
522 /* Based on footnote generation code from:
523 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
526 footnotes: function () {
527 var cont = document.getElementById("content");
528 var noteholder = document.getElementById("footnotes");
529 var spans = cont.getElementsByTagName("span");
530 var refs = {};
531 var n = 0;
532 for (i=0; i<spans.length; i++) {
533 if (spans[i].className == "footnote") {
534 n++;
535 // Use [\s\S] in place of . so multi-line matches work.
536 // Because JavaScript has no s (dotall) regex flag.
537 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
538 noteholder.innerHTML +=
539 "<div class='footnote' id='_footnote_" + n + "'>" +
540 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
541 n + "</a>. " + note + "</div>";
542 spans[i].innerHTML =
543 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
544 "' title='View footnote' class='footnote'>" + n + "</a>]";
545 var id =spans[i].getAttribute("id");
546 if (id != null) refs["#"+id] = n;
549 if (n == 0)
550 noteholder.parentNode.removeChild(noteholder);
551 else {
552 // Process footnoterefs.
553 for (i=0; i<spans.length; i++) {
554 if (spans[i].className == "footnoteref") {
555 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
556 href = href.match(/#.*/)[0]; // Because IE return full URL.
557 n = refs[href];
558 spans[i].innerHTML =
559 "[<a href='#_footnote_" + n +
560 "' title='View footnote' class='footnote'>" + n + "</a>]";
567 /*]]>*/
568 </script>
569 </head>
570 <body>
571 <div id="header">
572 <h1>
573 git-rev-list(1) Manual Page
574 </h1>
575 <h2>NAME</h2>
576 <div class="sectionbody">
577 <p>git-rev-list -
578 Lists commit objects in reverse chronological order
579 </p>
580 </div>
581 </div>
582 <div id="content">
583 <h2 id="_synopsis">SYNOPSIS</h2>
584 <div class="sectionbody">
585 <div class="verseblock">
586 <div class="verseblock-content"><em>git rev-list</em> [ --max-count=&lt;number&gt; ]
587 [ --skip=&lt;number&gt; ]
588 [ --max-age=&lt;timestamp&gt; ]
589 [ --min-age=&lt;timestamp&gt; ]
590 [ --sparse ]
591 [ --merges ]
592 [ --no-merges ]
593 [ --min-parents=&lt;number&gt; ]
594 [ --no-min-parents ]
595 [ --max-parents=&lt;number&gt; ]
596 [ --no-max-parents ]
597 [ --first-parent ]
598 [ --remove-empty ]
599 [ --full-history ]
600 [ --not ]
601 [ --all ]
602 [ --branches[=&lt;pattern&gt;] ]
603 [ --tags[=&lt;pattern&gt;] ]
604 [ --remotes[=&lt;pattern&gt;] ]
605 [ --glob=&lt;glob-pattern&gt; ]
606 [ --ignore-missing ]
607 [ --stdin ]
608 [ --quiet ]
609 [ --topo-order ]
610 [ --parents ]
611 [ --timestamp ]
612 [ --left-right ]
613 [ --left-only ]
614 [ --right-only ]
615 [ --cherry-mark ]
616 [ --cherry-pick ]
617 [ --encoding[=&lt;encoding&gt;] ]
618 [ --(author|committer|grep)=&lt;pattern&gt; ]
619 [ --regexp-ignore-case | -i ]
620 [ --extended-regexp | -E ]
621 [ --fixed-strings | -F ]
622 [ --date=(local|relative|default|iso|rfc|short) ]
623 [ [--objects | --objects-edge] [ --unpacked ] ]
624 [ --pretty | --header ]
625 [ --bisect ]
626 [ --bisect-vars ]
627 [ --bisect-all ]
628 [ --merge ]
629 [ --reverse ]
630 [ --walk-reflogs ]
631 [ --no-walk ] [ --do-walk ]
632 &lt;commit&gt;&#8230; [ -- &lt;paths&gt;&#8230; ]</div>
633 <div class="verseblock-attribution">
634 </div></div>
635 </div>
636 <h2 id="_description">DESCRIPTION</h2>
637 <div class="sectionbody">
638 <div class="paragraph"><p>List commits that are reachable by following the <tt>parent</tt> links from the
639 given commit(s), but exclude commits that are reachable from the one(s)
640 given with a <em>&#94;</em> in front of them. The output is given in reverse
641 chronological order by default.</p></div>
642 <div class="paragraph"><p>You can think of this as a set operation. Commits given on the command
643 line form a set of commits that are reachable from any of them, and then
644 commits reachable from any of the ones given with <em>&#94;</em> in front are
645 subtracted from that set. The remaining commits are what comes out in the
646 command&#8217;s output. Various other options and paths parameters can be used
647 to further limit the result.</p></div>
648 <div class="paragraph"><p>Thus, the following command:</p></div>
649 <div class="listingblock">
650 <div class="content">
651 <pre><tt> $ git rev-list foo bar ^baz</tt></pre>
652 </div></div>
653 <div class="paragraph"><p>means "list all the commits which are reachable from <em>foo</em> or <em>bar</em>, but
654 not from <em>baz</em>".</p></div>
655 <div class="paragraph"><p>A special notation "<em>&lt;commit1&gt;</em>..<em>&lt;commit2&gt;</em>" can be used as a
656 short-hand for "&#94;<em>&lt;commit1&gt;</em> <em>&lt;commit2&gt;</em>". For example, either of
657 the following may be used interchangeably:</p></div>
658 <div class="listingblock">
659 <div class="content">
660 <pre><tt> $ git rev-list origin..HEAD
661 $ git rev-list HEAD ^origin</tt></pre>
662 </div></div>
663 <div class="paragraph"><p>Another special notation is "<em>&lt;commit1&gt;</em>&#8230;<em>&lt;commit2&gt;</em>" which is useful
664 for merges. The resulting set of commits is the symmetric difference
665 between the two operands. The following two commands are equivalent:</p></div>
666 <div class="listingblock">
667 <div class="content">
668 <pre><tt> $ git rev-list A B --not $(git merge-base --all A B)
669 $ git rev-list A...B</tt></pre>
670 </div></div>
671 <div class="paragraph"><p><em>rev-list</em> is a very essential git command, since it
672 provides the ability to build and traverse commit ancestry graphs. For
673 this reason, it has a lot of different options that enables it to be
674 used by commands as different as <em>git bisect</em> and
675 <em>git repack</em>.</p></div>
676 </div>
677 <h2 id="_options">OPTIONS</h2>
678 <div class="sectionbody">
679 <h3 id="_commit_limiting">Commit Limiting</h3><div style="clear:left"></div>
680 <div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
681 special notations explained in the description, additional commit
682 limiting may be applied. Note that they are applied before commit
683 ordering and formatting options, such as <em>--reverse</em>.</p></div>
684 <div class="dlist"><dl>
685 <dt class="hdlist1">
686 -n <em>number</em>
687 </dt>
688 <dt class="hdlist1">
689 --max-count=&lt;number&gt;
690 </dt>
691 <dd>
693 Limit the number of commits to output.
694 </p>
695 </dd>
696 <dt class="hdlist1">
697 --skip=&lt;number&gt;
698 </dt>
699 <dd>
701 Skip <em>number</em> commits before starting to show the commit output.
702 </p>
703 </dd>
704 <dt class="hdlist1">
705 --since=&lt;date&gt;
706 </dt>
707 <dt class="hdlist1">
708 --after=&lt;date&gt;
709 </dt>
710 <dd>
712 Show commits more recent than a specific date.
713 </p>
714 </dd>
715 <dt class="hdlist1">
716 --until=&lt;date&gt;
717 </dt>
718 <dt class="hdlist1">
719 --before=&lt;date&gt;
720 </dt>
721 <dd>
723 Show commits older than a specific date.
724 </p>
725 </dd>
726 <dt class="hdlist1">
727 --max-age=&lt;timestamp&gt;
728 </dt>
729 <dt class="hdlist1">
730 --min-age=&lt;timestamp&gt;
731 </dt>
732 <dd>
734 Limit the commits output to specified time range.
735 </p>
736 </dd>
737 <dt class="hdlist1">
738 --author=&lt;pattern&gt;
739 </dt>
740 <dt class="hdlist1">
741 --committer=&lt;pattern&gt;
742 </dt>
743 <dd>
745 Limit the commits output to ones with author/committer
746 header lines that match the specified pattern (regular expression).
747 </p>
748 </dd>
749 <dt class="hdlist1">
750 --grep=&lt;pattern&gt;
751 </dt>
752 <dd>
754 Limit the commits output to ones with log message that
755 matches the specified pattern (regular expression).
756 </p>
757 </dd>
758 <dt class="hdlist1">
759 --all-match
760 </dt>
761 <dd>
763 Limit the commits output to ones that match all given --grep,
764 --author and --committer instead of ones that match at least one.
765 </p>
766 </dd>
767 <dt class="hdlist1">
769 </dt>
770 <dt class="hdlist1">
771 --regexp-ignore-case
772 </dt>
773 <dd>
775 Match the regexp limiting patterns without regard to letters case.
776 </p>
777 </dd>
778 <dt class="hdlist1">
780 </dt>
781 <dt class="hdlist1">
782 --extended-regexp
783 </dt>
784 <dd>
786 Consider the limiting patterns to be extended regular expressions
787 instead of the default basic regular expressions.
788 </p>
789 </dd>
790 <dt class="hdlist1">
792 </dt>
793 <dt class="hdlist1">
794 --fixed-strings
795 </dt>
796 <dd>
798 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
799 pattern as a regular expression).
800 </p>
801 </dd>
802 <dt class="hdlist1">
803 --remove-empty
804 </dt>
805 <dd>
807 Stop when a given path disappears from the tree.
808 </p>
809 </dd>
810 <dt class="hdlist1">
811 --merges
812 </dt>
813 <dd>
815 Print only merge commits. This is exactly the same as <tt>--min-parents=2</tt>.
816 </p>
817 </dd>
818 <dt class="hdlist1">
819 --no-merges
820 </dt>
821 <dd>
823 Do not print commits with more than one parent. This is
824 exactly the same as <tt>--max-parents=1</tt>.
825 </p>
826 </dd>
827 <dt class="hdlist1">
828 --min-parents=&lt;number&gt;
829 </dt>
830 <dt class="hdlist1">
831 --max-parents=&lt;number&gt;
832 </dt>
833 <dt class="hdlist1">
834 --no-min-parents
835 </dt>
836 <dt class="hdlist1">
837 --no-max-parents
838 </dt>
839 <dd>
841 Show only commits which have at least (or at most) that many
842 commits. In particular, <tt>--max-parents=1</tt> is the same as <tt>--no-merges</tt>,
843 <tt>--min-parents=2</tt> is the same as <tt>--merges</tt>. <tt>--max-parents=0</tt>
844 gives all root commits and <tt>--min-parents=3</tt> all octopus merges.
845 </p>
846 <div class="paragraph"><p><tt>--no-min-parents</tt> and <tt>--no-max-parents</tt> reset these limits (to no limit)
847 again. Equivalent forms are <tt>--min-parents=0</tt> (any commit has 0 or more
848 parents) and <tt>--max-parents=-1</tt> (negative numbers denote no upper limit).</p></div>
849 </dd>
850 <dt class="hdlist1">
851 --first-parent
852 </dt>
853 <dd>
855 Follow only the first parent commit upon seeing a merge
856 commit. This option can give a better overview when
857 viewing the evolution of a particular topic branch,
858 because merges into a topic branch tend to be only about
859 adjusting to updated upstream from time to time, and
860 this option allows you to ignore the individual commits
861 brought in to your history by such a merge.
862 </p>
863 </dd>
864 <dt class="hdlist1">
865 --not
866 </dt>
867 <dd>
869 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
870 for all following revision specifiers, up to the next <em>--not</em>.
871 </p>
872 </dd>
873 <dt class="hdlist1">
874 --all
875 </dt>
876 <dd>
878 Pretend as if all the refs in <tt>refs/</tt> are listed on the
879 command line as <em>&lt;commit&gt;</em>.
880 </p>
881 </dd>
882 <dt class="hdlist1">
883 --branches[=&lt;pattern&gt;]
884 </dt>
885 <dd>
887 Pretend as if all the refs in <tt>refs/heads</tt> are listed
888 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
889 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
890 <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied.
891 </p>
892 </dd>
893 <dt class="hdlist1">
894 --tags[=&lt;pattern&gt;]
895 </dt>
896 <dd>
898 Pretend as if all the refs in <tt>refs/tags</tt> are listed
899 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
900 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em><strong></em>,
901 or <em>[</em>, <em>/</strong></em> at the end is implied.
902 </p>
903 </dd>
904 <dt class="hdlist1">
905 --remotes[=&lt;pattern&gt;]
906 </dt>
907 <dd>
909 Pretend as if all the refs in <tt>refs/remotes</tt> are listed
910 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
911 remote-tracking branches to ones matching given shell glob.
912 If pattern lacks <em>?</em>, <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied.
913 </p>
914 </dd>
915 <dt class="hdlist1">
916 --glob=&lt;glob-pattern&gt;
917 </dt>
918 <dd>
920 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
921 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
922 is automatically prepended if missing. If pattern lacks <em>?</em>, <em><strong></em>,
923 or <em>[</em>, <em>/</strong></em> at the end is implied.
924 </p>
925 </dd>
926 <dt class="hdlist1">
927 --ignore-missing
928 </dt>
929 <dd>
931 Upon seeing an invalid object name in the input, pretend as if
932 the bad input was not given.
933 </p>
934 </dd>
935 <dt class="hdlist1">
936 --stdin
937 </dt>
938 <dd>
940 In addition to the <em>&lt;commit&gt;</em> listed on the command
941 line, read them from the standard input. If a <em>--</em> separator is
942 seen, stop reading commits and start reading paths to limit the
943 result.
944 </p>
945 </dd>
946 <dt class="hdlist1">
947 --quiet
948 </dt>
949 <dd>
951 Don&#8217;t print anything to standard output. This form
952 is primarily meant to allow the caller to
953 test the exit status to see if a range of objects is fully
954 connected (or not). It is faster than redirecting stdout
955 to /dev/null as the output does not have to be formatted.
956 </p>
957 </dd>
958 <dt class="hdlist1">
959 --cherry-mark
960 </dt>
961 <dd>
963 Like <tt>--cherry-pick</tt> (see below) but mark equivalent commits
964 with <tt>=</tt> rather than omitting them, and inequivalent ones with <tt>+</tt>.
965 </p>
966 </dd>
967 <dt class="hdlist1">
968 --cherry-pick
969 </dt>
970 <dd>
972 Omit any commit that introduces the same change as
973 another commit on the "other side" when the set of
974 commits are limited with symmetric difference.
975 </p>
976 <div class="paragraph"><p>For example, if you have two branches, <tt>A</tt> and <tt>B</tt>, a usual way
977 to list all commits on only one side of them is with
978 <tt>--left-right</tt> (see the example below in the description of
979 the <tt>--left-right</tt> option). It however shows the commits that were cherry-picked
980 from the other branch (for example, "3rd on b" may be cherry-picked
981 from branch A). With this option, such pairs of commits are
982 excluded from the output.</p></div>
983 </dd>
984 <dt class="hdlist1">
985 --left-only
986 </dt>
987 <dt class="hdlist1">
988 --right-only
989 </dt>
990 <dd>
992 List only commits on the respective side of a symmetric range,
993 i.e. only those which would be marked <tt>&lt;</tt> resp. <tt>&gt;</tt> by
994 <tt>--left-right</tt>.
995 </p>
996 <div class="paragraph"><p>For example, <tt>--cherry-pick --right-only A&#8230;B</tt> omits those
997 commits from <tt>B</tt> which are in <tt>A</tt> or are patch-equivalent to a commit in
998 <tt>A</tt>. In other words, this lists the <tt>&#43;</tt> commits from <tt>git cherry A B</tt>.
999 More precisely, <tt>--cherry-pick --right-only --no-merges</tt> gives the exact
1000 list.</p></div>
1001 </dd>
1002 <dt class="hdlist1">
1003 --cherry
1004 </dt>
1005 <dd>
1007 A synonym for <tt>--right-only --cherry-mark --no-merges</tt>; useful to
1008 limit the output to the commits on our side and mark those that
1009 have been applied to the other side of a forked history with
1010 <tt>git log --cherry upstream&#8230;mybranch</tt>, similar to
1011 <tt>git cherry upstream mybranch</tt>.
1012 </p>
1013 </dd>
1014 <dt class="hdlist1">
1016 </dt>
1017 <dt class="hdlist1">
1018 --walk-reflogs
1019 </dt>
1020 <dd>
1022 Instead of walking the commit ancestry chain, walk
1023 reflog entries from the most recent one to older ones.
1024 When this option is used you cannot specify commits to
1025 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
1026 nor <em>commit1...commit2</em> notations cannot be used).
1027 </p>
1028 <div class="paragraph"><p>With <em>--pretty</em> format other than oneline (for obvious reasons),
1029 this causes the output to have two extra lines of information
1030 taken from the reflog. By default, <em>commit@{Nth}</em> notation is
1031 used in the output. When the starting commit is specified as
1032 <em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation
1033 instead. Under <em>--pretty=oneline</em>, the commit message is
1034 prefixed with this information on the same line.
1035 This option cannot be combined with <em>--reverse</em>.
1036 See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
1037 </dd>
1038 <dt class="hdlist1">
1039 --merge
1040 </dt>
1041 <dd>
1043 After a failed merge, show refs that touch files having a
1044 conflict and don&#8217;t exist on all heads to merge.
1045 </p>
1046 </dd>
1047 <dt class="hdlist1">
1048 --boundary
1049 </dt>
1050 <dd>
1052 Output uninteresting commits at the boundary, which are usually
1053 not shown.
1054 </p>
1055 </dd>
1056 </dl></div>
1057 <h3 id="_history_simplification">History Simplification</h3><div style="clear:left"></div>
1058 <div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
1059 commits modifying a particular &lt;path&gt;. But there are two parts of
1060 <em>History Simplification</em>, one part is selecting the commits and the other
1061 is how to do it, as there are various strategies to simplify the history.</p></div>
1062 <div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1063 <div class="dlist"><dl>
1064 <dt class="hdlist1">
1065 &lt;paths&gt;
1066 </dt>
1067 <dd>
1069 Commits modifying the given &lt;paths&gt; are selected.
1070 </p>
1071 </dd>
1072 <dt class="hdlist1">
1073 --simplify-by-decoration
1074 </dt>
1075 <dd>
1077 Commits that are referred by some branch or tag are selected.
1078 </p>
1079 </dd>
1080 </dl></div>
1081 <div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1082 <div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1083 <div class="dlist"><dl>
1084 <dt class="hdlist1">
1085 Default mode
1086 </dt>
1087 <dd>
1089 Simplifies the history to the simplest history explaining the
1090 final state of the tree. Simplest because it prunes some side
1091 branches if the end result is the same (i.e. merging branches
1092 with the same content)
1093 </p>
1094 </dd>
1095 <dt class="hdlist1">
1096 --full-history
1097 </dt>
1098 <dd>
1100 Same as the default mode, but does not prune some history.
1101 </p>
1102 </dd>
1103 <dt class="hdlist1">
1104 --dense
1105 </dt>
1106 <dd>
1108 Only the selected commits are shown, plus some to have a
1109 meaningful history.
1110 </p>
1111 </dd>
1112 <dt class="hdlist1">
1113 --sparse
1114 </dt>
1115 <dd>
1117 All commits in the simplified history are shown.
1118 </p>
1119 </dd>
1120 <dt class="hdlist1">
1121 --simplify-merges
1122 </dt>
1123 <dd>
1125 Additional option to <em>--full-history</em> to remove some needless
1126 merges from the resulting history, as there are no selected
1127 commits contributing to this merge.
1128 </p>
1129 </dd>
1130 <dt class="hdlist1">
1131 --ancestry-path
1132 </dt>
1133 <dd>
1135 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1136 or <em>commit2 &#94;commit1</em>), only display commits that exist
1137 directly on the ancestry chain between the <em>commit1</em> and
1138 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1139 and ancestors of <em>commit2</em>.
1140 </p>
1141 </dd>
1142 </dl></div>
1143 <div class="paragraph"><p>A more detailed explanation follows.</p></div>
1144 <div class="paragraph"><p>Suppose you specified <tt>foo</tt> as the &lt;paths&gt;. We shall call commits
1145 that modify <tt>foo</tt> !TREESAME, and the rest TREESAME. (In a diff
1146 filtered for <tt>foo</tt>, they look different and equal, respectively.)</p></div>
1147 <div class="paragraph"><p>In the following, we will always refer to the same example history to
1148 illustrate the differences between simplification settings. We assume
1149 that you are filtering for a file <tt>foo</tt> in this commit graph:</p></div>
1150 <div class="listingblock">
1151 <div class="content">
1152 <pre><tt> .-A---M---N---O---P
1153 / / / / /
1154 I B C D E
1155 \ / / / /
1156 `-------------'</tt></pre>
1157 </div></div>
1158 <div class="paragraph"><p>The horizontal line of history A---P is taken to be the first parent of
1159 each merge. The commits are:</p></div>
1160 <div class="ulist"><ul>
1161 <li>
1163 <tt>I</tt> is the initial commit, in which <tt>foo</tt> exists with contents
1164 "asdf", and a file <tt>quux</tt> exists with contents "quux". Initial
1165 commits are compared to an empty tree, so <tt>I</tt> is !TREESAME.
1166 </p>
1167 </li>
1168 <li>
1170 In <tt>A</tt>, <tt>foo</tt> contains just "foo".
1171 </p>
1172 </li>
1173 <li>
1175 <tt>B</tt> contains the same change as <tt>A</tt>. Its merge <tt>M</tt> is trivial and
1176 hence TREESAME to all parents.
1177 </p>
1178 </li>
1179 <li>
1181 <tt>C</tt> does not change <tt>foo</tt>, but its merge <tt>N</tt> changes it to "foobar",
1182 so it is not TREESAME to any parent.
1183 </p>
1184 </li>
1185 <li>
1187 <tt>D</tt> sets <tt>foo</tt> to "baz". Its merge <tt>O</tt> combines the strings from
1188 <tt>N</tt> and <tt>D</tt> to "foobarbaz"; i.e., it is not TREESAME to any parent.
1189 </p>
1190 </li>
1191 <li>
1193 <tt>E</tt> changes <tt>quux</tt> to "xyzzy", and its merge <tt>P</tt> combines the
1194 strings to "quux xyzzy". Despite appearing interesting, <tt>P</tt> is
1195 TREESAME to all parents.
1196 </p>
1197 </li>
1198 </ul></div>
1199 <div class="paragraph"><p><em>rev-list</em> walks backwards through history, including or excluding
1200 commits based on whether <em>--full-history</em> and/or parent rewriting
1201 (via <em>--parents</em> or <em>--children</em>) are used. The following settings
1202 are available.</p></div>
1203 <div class="dlist"><dl>
1204 <dt class="hdlist1">
1205 Default mode
1206 </dt>
1207 <dd>
1209 Commits are included if they are not TREESAME to any parent
1210 (though this can be changed, see <em>--sparse</em> below). If the
1211 commit was a merge, and it was TREESAME to one parent, follow
1212 only that parent. (Even if there are several TREESAME
1213 parents, follow only one of them.) Otherwise, follow all
1214 parents.
1215 </p>
1216 <div class="paragraph"><p>This results in:</p></div>
1217 <div class="listingblock">
1218 <div class="content">
1219 <pre><tt> .-A---N---O
1220 / / /
1221 I---------D</tt></pre>
1222 </div></div>
1223 <div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
1224 available, removed <tt>B</tt> from consideration entirely. <tt>C</tt> was
1225 considered via <tt>N</tt>, but is TREESAME. Root commits are compared to an
1226 empty tree, so <tt>I</tt> is !TREESAME.</p></div>
1227 <div class="paragraph"><p>Parent/child relations are only visible with --parents, but that does
1228 not affect the commits selected in default mode, so we have shown the
1229 parent lines.</p></div>
1230 </dd>
1231 <dt class="hdlist1">
1232 --full-history without parent rewriting
1233 </dt>
1234 <dd>
1236 This mode differs from the default in one point: always follow
1237 all parents of a merge, even if it is TREESAME to one of them.
1238 Even if more than one side of the merge has commits that are
1239 included, this does not imply that the merge itself is! In
1240 the example, we get
1241 </p>
1242 <div class="listingblock">
1243 <div class="content">
1244 <pre><tt> I A B N D O</tt></pre>
1245 </div></div>
1246 <div class="paragraph"><p><tt>P</tt> and <tt>M</tt> were excluded because they are TREESAME to a parent. <tt>E</tt>,
1247 <tt>C</tt> and <tt>B</tt> were all walked, but only <tt>B</tt> was !TREESAME, so the others
1248 do not appear.</p></div>
1249 <div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
1250 about the parent/child relationships between the commits, so we show
1251 them disconnected.</p></div>
1252 </dd>
1253 <dt class="hdlist1">
1254 --full-history with parent rewriting
1255 </dt>
1256 <dd>
1258 Ordinary commits are only included if they are !TREESAME
1259 (though this can be changed, see <em>--sparse</em> below).
1260 </p>
1261 <div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
1262 Along each parent, prune away commits that are not included
1263 themselves. This results in</p></div>
1264 <div class="listingblock">
1265 <div class="content">
1266 <pre><tt> .-A---M---N---O---P
1267 / / / / /
1268 I B / D /
1269 \ / / / /
1270 `-------------'</tt></pre>
1271 </div></div>
1272 <div class="paragraph"><p>Compare to <em>--full-history</em> without rewriting above. Note that <tt>E</tt>
1273 was pruned away because it is TREESAME, but the parent list of P was
1274 rewritten to contain <tt>E</tt>'s parent <tt>I</tt>. The same happened for <tt>C</tt> and
1275 <tt>N</tt>. Note also that <tt>P</tt> was included despite being TREESAME.</p></div>
1276 </dd>
1277 </dl></div>
1278 <div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
1279 affects inclusion:</p></div>
1280 <div class="dlist"><dl>
1281 <dt class="hdlist1">
1282 --dense
1283 </dt>
1284 <dd>
1286 Commits that are walked are included if they are not TREESAME
1287 to any parent.
1288 </p>
1289 </dd>
1290 <dt class="hdlist1">
1291 --sparse
1292 </dt>
1293 <dd>
1295 All commits that are walked are included.
1296 </p>
1297 <div class="paragraph"><p>Note that without <em>--full-history</em>, this still simplifies merges: if
1298 one of the parents is TREESAME, we follow only that one, so the other
1299 sides of the merge are never walked.</p></div>
1300 </dd>
1301 <dt class="hdlist1">
1302 --simplify-merges
1303 </dt>
1304 <dd>
1306 First, build a history graph in the same way that
1307 <em>--full-history</em> with parent rewriting does (see above).
1308 </p>
1309 <div class="paragraph"><p>Then simplify each commit &#8216;C` to its replacement <tt>C&#8217;</tt> in the final
1310 history according to the following rules:</p></div>
1311 <div class="ulist"><ul>
1312 <li>
1314 Set &#8216;C&#8217;` to <tt>C</tt>.
1315 </p>
1316 </li>
1317 <li>
1319 Replace each parent &#8216;P` of <tt>C&#8217;</tt> with its simplification &#8216;P&#8217;`. In
1320 the process, drop parents that are ancestors of other parents, and
1321 remove duplicates.
1322 </p>
1323 </li>
1324 <li>
1326 If after this parent rewriting, &#8216;C&#8217;` is a root or merge commit (has
1327 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1328 Otherwise, it is replaced with its only parent.
1329 </p>
1330 </li>
1331 </ul></div>
1332 <div class="paragraph"><p>The effect of this is best shown by way of comparing to
1333 <em>--full-history</em> with parent rewriting. The example turns into:</p></div>
1334 <div class="listingblock">
1335 <div class="content">
1336 <pre><tt> .-A---M---N---O
1337 / / /
1338 I B D
1339 \ / /
1340 `---------'</tt></pre>
1341 </div></div>
1342 <div class="paragraph"><p>Note the major differences in <tt>N</tt> and <tt>P</tt> over <em>--full-history</em>:</p></div>
1343 <div class="ulist"><ul>
1344 <li>
1346 <tt>N</tt>'s parent list had <tt>I</tt> removed, because it is an ancestor of the
1347 other parent <tt>M</tt>. Still, <tt>N</tt> remained because it is !TREESAME.
1348 </p>
1349 </li>
1350 <li>
1352 <tt>P</tt>'s parent list similarly had <tt>I</tt> removed. <tt>P</tt> was then
1353 removed completely, because it had one parent and is TREESAME.
1354 </p>
1355 </li>
1356 </ul></div>
1357 </dd>
1358 </dl></div>
1359 <div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1360 <div class="dlist"><dl>
1361 <dt class="hdlist1">
1362 --ancestry-path
1363 </dt>
1364 <dd>
1366 Limit the displayed commits to those directly on the ancestry
1367 chain between the "from" and "to" commits in the given commit
1368 range. I.e. only display commits that are ancestor of the "to"
1369 commit, and descendants of the "from" commit.
1370 </p>
1371 <div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
1372 <div class="listingblock">
1373 <div class="content">
1374 <pre><tt> D---E-------F
1375 / \ \
1376 B---C---G---H---I---J
1378 A-------K---------------L--M</tt></pre>
1379 </div></div>
1380 <div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <tt>M</tt>,
1381 but excludes the ones that are ancestors of <tt>D</tt>. This is useful to see
1382 what happened to the history leading to <tt>M</tt> since <tt>D</tt>, in the sense
1383 that "what does <tt>M</tt> have that did not exist in <tt>D</tt>". The result in this
1384 example would be all the commits, except <tt>A</tt> and <tt>B</tt> (and <tt>D</tt> itself,
1385 of course).</p></div>
1386 <div class="paragraph"><p>When we want to find out what commits in <tt>M</tt> are contaminated with the
1387 bug introduced by <tt>D</tt> and need fixing, however, we might want to view
1388 only the subset of <em>D..M</em> that are actually descendants of <tt>D</tt>, i.e.
1389 excluding <tt>C</tt> and <tt>K</tt>. This is exactly what the <em>--ancestry-path</em>
1390 option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1391 <div class="listingblock">
1392 <div class="content">
1393 <pre><tt> E-------F
1395 G---H---I---J
1397 L--M</tt></pre>
1398 </div></div>
1399 </dd>
1400 </dl></div>
1401 <div class="paragraph"><p>The <em>--simplify-by-decoration</em> option allows you to view only the
1402 big picture of the topology of the history, by omitting commits
1403 that are not referenced by tags. Commits are marked as !TREESAME
1404 (in other words, kept after history simplification rules described
1405 above) if (1) they are referenced by tags, or (2) they change the
1406 contents of the paths given on the command line. All other
1407 commits are marked as TREESAME (subject to be simplified away).</p></div>
1408 <h3 id="_bisection_helpers">Bisection Helpers</h3><div style="clear:left"></div>
1409 <div class="dlist"><dl>
1410 <dt class="hdlist1">
1411 --bisect
1412 </dt>
1413 <dd>
1415 Limit output to the one commit object which is roughly halfway between
1416 included and excluded commits. Note that the bad bisection ref
1417 <tt>refs/bisect/bad</tt> is added to the included commits (if it
1418 exists) and the good bisection refs <tt>refs/bisect/good-*</tt> are
1419 added to the excluded commits (if they exist). Thus, supposing there
1420 are no refs in <tt>refs/bisect/</tt>, if
1421 </p>
1422 </dd>
1423 </dl></div>
1424 <div class="listingblock">
1425 <div class="content">
1426 <pre><tt> $ git rev-list --bisect foo ^bar ^baz</tt></pre>
1427 </div></div>
1428 <div class="paragraph"><p>outputs <em>midpoint</em>, the output of the two commands</p></div>
1429 <div class="listingblock">
1430 <div class="content">
1431 <pre><tt> $ git rev-list foo ^midpoint
1432 $ git rev-list midpoint ^bar ^baz</tt></pre>
1433 </div></div>
1434 <div class="paragraph"><p>would be of roughly the same length. Finding the change which
1435 introduces a regression is thus reduced to a binary search: repeatedly
1436 generate and test new 'midpoint&#8217;s until the commit chain is of length
1437 one.</p></div>
1438 <div class="dlist"><dl>
1439 <dt class="hdlist1">
1440 --bisect-vars
1441 </dt>
1442 <dd>
1444 This calculates the same as <tt>--bisect</tt>, except that refs in
1445 <tt>refs/bisect/</tt> are not used, and except that this outputs
1446 text ready to be eval&#8217;ed by the shell. These lines will assign the
1447 name of the midpoint revision to the variable <tt>bisect_rev</tt>, and the
1448 expected number of commits to be tested after <tt>bisect_rev</tt> is tested
1449 to <tt>bisect_nr</tt>, the expected number of commits to be tested if
1450 <tt>bisect_rev</tt> turns out to be good to <tt>bisect_good</tt>, the expected
1451 number of commits to be tested if <tt>bisect_rev</tt> turns out to be bad to
1452 <tt>bisect_bad</tt>, and the number of commits we are bisecting right now to
1453 <tt>bisect_all</tt>.
1454 </p>
1455 </dd>
1456 <dt class="hdlist1">
1457 --bisect-all
1458 </dt>
1459 <dd>
1461 This outputs all the commit objects between the included and excluded
1462 commits, ordered by their distance to the included and excluded
1463 commits. Refs in <tt>refs/bisect/</tt> are not used. The farthest
1464 from them is displayed first. (This is the only one displayed by
1465 <tt>--bisect</tt>.)
1466 </p>
1467 <div class="paragraph"><p>This is useful because it makes it easy to choose a good commit to
1468 test when you want to avoid to test some of them for some reason (they
1469 may not compile for example).</p></div>
1470 <div class="paragraph"><p>This option can be used along with <tt>--bisect-vars</tt>, in this case,
1471 after all the sorted commit objects, there will be the same text as if
1472 <tt>--bisect-vars</tt> had been used alone.</p></div>
1473 </dd>
1474 </dl></div>
1475 <h3 id="_commit_ordering">Commit Ordering</h3><div style="clear:left"></div>
1476 <div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1477 <div class="dlist"><dl>
1478 <dt class="hdlist1">
1479 --topo-order
1480 </dt>
1481 <dd>
1483 This option makes them appear in topological order (i.e.
1484 descendant commits are shown before their parents).
1485 </p>
1486 </dd>
1487 <dt class="hdlist1">
1488 --date-order
1489 </dt>
1490 <dd>
1492 This option is similar to <em>--topo-order</em> in the sense that no
1493 parent comes before all of its children, but otherwise things
1494 are still ordered in the commit timestamp order.
1495 </p>
1496 </dd>
1497 <dt class="hdlist1">
1498 --reverse
1499 </dt>
1500 <dd>
1502 Output the commits in reverse order.
1503 Cannot be combined with <em>--walk-reflogs</em>.
1504 </p>
1505 </dd>
1506 </dl></div>
1507 <h3 id="_object_traversal">Object Traversal</h3><div style="clear:left"></div>
1508 <div class="paragraph"><p>These options are mostly targeted for packing of git repositories.</p></div>
1509 <div class="dlist"><dl>
1510 <dt class="hdlist1">
1511 --objects
1512 </dt>
1513 <dd>
1515 Print the object IDs of any object referenced by the listed
1516 commits. <em>--objects foo ^bar</em> thus means "send me
1517 all object IDs which I need to download if I have the commit
1518 object <em>bar</em>, but not <em>foo</em>".
1519 </p>
1520 </dd>
1521 <dt class="hdlist1">
1522 --objects-edge
1523 </dt>
1524 <dd>
1526 Similar to <em>--objects</em>, but also print the IDs of excluded
1527 commits prefixed with a "-" character. This is used by
1528 <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records
1529 objects in deltified form based on objects contained in these
1530 excluded commits to reduce network traffic.
1531 </p>
1532 </dd>
1533 <dt class="hdlist1">
1534 --unpacked
1535 </dt>
1536 <dd>
1538 Only useful with <em>--objects</em>; print the object IDs that are not
1539 in packs.
1540 </p>
1541 </dd>
1542 <dt class="hdlist1">
1543 --no-walk
1544 </dt>
1545 <dd>
1547 Only show the given revs, but do not traverse their ancestors.
1548 </p>
1549 </dd>
1550 <dt class="hdlist1">
1551 --do-walk
1552 </dt>
1553 <dd>
1555 Overrides a previous --no-walk.
1556 </p>
1557 </dd>
1558 </dl></div>
1559 <h3 id="_commit_formatting">Commit Formatting</h3><div style="clear:left"></div>
1560 <div class="paragraph"><p>Using these options, <a href="git-rev-list.html">git-rev-list(1)</a> will act similar to the
1561 more specialized family of commit log tools: <a href="git-log.html">git-log(1)</a>,
1562 <a href="git-show.html">git-show(1)</a>, and <a href="git-whatchanged.html">git-whatchanged(1)</a></p></div>
1563 <div class="dlist"><dl>
1564 <dt class="hdlist1">
1565 --pretty[=&lt;format&gt;]
1566 </dt>
1567 <dt class="hdlist1">
1568 --format=&lt;format&gt;
1569 </dt>
1570 <dd>
1572 Pretty-print the contents of the commit logs in a given format,
1573 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1574 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
1575 the "PRETTY FORMATS" section for some additional details for each
1576 format. When omitted, the format defaults to <em>medium</em>.
1577 </p>
1578 <div class="paragraph"><p>Note: you can specify the default pretty format in the repository
1579 configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
1580 </dd>
1581 <dt class="hdlist1">
1582 --abbrev-commit
1583 </dt>
1584 <dd>
1586 Instead of showing the full 40-byte hexadecimal commit object
1587 name, show only a partial prefix. Non default number of
1588 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1589 diff output, if it is displayed).
1590 </p>
1591 <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1592 people using 80-column terminals.</p></div>
1593 </dd>
1594 <dt class="hdlist1">
1595 --no-abbrev-commit
1596 </dt>
1597 <dd>
1599 Show the full 40-byte hexadecimal commit object name. This negates
1600 <tt>--abbrev-commit</tt> and those options which imply it such as
1601 "--oneline". It also overrides the <em>log.abbrevCommit</em> variable.
1602 </p>
1603 </dd>
1604 <dt class="hdlist1">
1605 --oneline
1606 </dt>
1607 <dd>
1609 This is a shorthand for "--pretty=oneline --abbrev-commit"
1610 used together.
1611 </p>
1612 </dd>
1613 <dt class="hdlist1">
1614 --encoding[=&lt;encoding&gt;]
1615 </dt>
1616 <dd>
1618 The commit objects record the encoding used for the log message
1619 in their encoding header; this option can be used to tell the
1620 command to re-code the commit log message in the encoding
1621 preferred by the user. For non plumbing commands this
1622 defaults to UTF-8.
1623 </p>
1624 </dd>
1625 <dt class="hdlist1">
1626 --notes[=&lt;ref&gt;]
1627 </dt>
1628 <dd>
1630 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
1631 commit, when showing the commit log message. This is the default
1632 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
1633 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option given
1634 on the command line.
1635 </p>
1636 <div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
1637 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding
1638 environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
1639 <div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, show this notes ref instead of the
1640 default notes ref(s). The ref is taken to be in <tt>refs/notes/</tt> if it
1641 is not qualified.</p></div>
1642 <div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
1643 being displayed. Examples: "--notes=foo" will show only notes from
1644 "refs/notes/foo"; "--notes=foo --notes" will show both notes from
1645 "refs/notes/foo" and from the default notes ref(s).</p></div>
1646 </dd>
1647 <dt class="hdlist1">
1648 --no-notes
1649 </dt>
1650 <dd>
1652 Do not show notes. This negates the above <tt>--notes</tt> option, by
1653 resetting the list of notes refs from which notes are shown.
1654 Options are parsed in the order given on the command line, so e.g.
1655 "--notes --notes=foo --no-notes --notes=bar" will only show notes
1656 from "refs/notes/bar".
1657 </p>
1658 </dd>
1659 <dt class="hdlist1">
1660 --show-notes[=&lt;ref&gt;]
1661 </dt>
1662 <dt class="hdlist1">
1663 --[no-]standard-notes
1664 </dt>
1665 <dd>
1667 These options are deprecated. Use the above --notes/--no-notes
1668 options instead.
1669 </p>
1670 </dd>
1671 <dt class="hdlist1">
1672 --relative-date
1673 </dt>
1674 <dd>
1676 Synonym for <tt>--date=relative</tt>.
1677 </p>
1678 </dd>
1679 <dt class="hdlist1">
1680 --date=(relative|local|default|iso|rfc|short|raw)
1681 </dt>
1682 <dd>
1684 Only takes effect for dates shown in human-readable format, such
1685 as when using "--pretty". <tt>log.date</tt> config variable sets a default
1686 value for log command&#8217;s --date option.
1687 </p>
1688 <div class="paragraph"><p><tt>--date=relative</tt> shows dates relative to the current time,
1689 e.g. "2 hours ago".</p></div>
1690 <div class="paragraph"><p><tt>--date=local</tt> shows timestamps in user&#8217;s local timezone.</p></div>
1691 <div class="paragraph"><p><tt>--date=iso</tt> (or <tt>--date=iso8601</tt>) shows timestamps in ISO 8601 format.</p></div>
1692 <div class="paragraph"><p><tt>--date=rfc</tt> (or <tt>--date=rfc2822</tt>) shows timestamps in RFC 2822
1693 format, often found in E-mail messages.</p></div>
1694 <div class="paragraph"><p><tt>--date=short</tt> shows only date but not time, in <tt>YYYY-MM-DD</tt> format.</p></div>
1695 <div class="paragraph"><p><tt>--date=raw</tt> shows the date in the internal raw git format <tt>%s %z</tt> format.</p></div>
1696 <div class="paragraph"><p><tt>--date=default</tt> shows timestamps in the original timezone
1697 (either committer&#8217;s or author&#8217;s).</p></div>
1698 </dd>
1699 <dt class="hdlist1">
1700 --header
1701 </dt>
1702 <dd>
1704 Print the contents of the commit in raw-format; each record is
1705 separated with a NUL character.
1706 </p>
1707 </dd>
1708 <dt class="hdlist1">
1709 --parents
1710 </dt>
1711 <dd>
1713 Print also the parents of the commit (in the form "commit parent&#8230;").
1714 Also enables parent rewriting, see <em>History Simplification</em> below.
1715 </p>
1716 </dd>
1717 <dt class="hdlist1">
1718 --children
1719 </dt>
1720 <dd>
1722 Print also the children of the commit (in the form "commit child&#8230;").
1723 Also enables parent rewriting, see <em>History Simplification</em> below.
1724 </p>
1725 </dd>
1726 <dt class="hdlist1">
1727 --timestamp
1728 </dt>
1729 <dd>
1731 Print the raw commit timestamp.
1732 </p>
1733 </dd>
1734 <dt class="hdlist1">
1735 --left-right
1736 </dt>
1737 <dd>
1739 Mark which side of a symmetric diff a commit is reachable from.
1740 Commits from the left side are prefixed with <tt>&lt;</tt> and those from
1741 the right with <tt>&gt;</tt>. If combined with <tt>--boundary</tt>, those
1742 commits are prefixed with <tt>-</tt>.
1743 </p>
1744 <div class="paragraph"><p>For example, if you have this topology:</p></div>
1745 <div class="listingblock">
1746 <div class="content">
1747 <pre><tt> y---b---b branch B
1748 / \ /
1750 / / \
1751 o---x---a---a branch A</tt></pre>
1752 </div></div>
1753 <div class="paragraph"><p>you would get an output like this:</p></div>
1754 <div class="listingblock">
1755 <div class="content">
1756 <pre><tt> $ git rev-list --left-right --boundary --pretty=oneline A...B
1758 &gt;bbbbbbb... 3rd on b
1759 &gt;bbbbbbb... 2nd on b
1760 &lt;aaaaaaa... 3rd on a
1761 &lt;aaaaaaa... 2nd on a
1762 -yyyyyyy... 1st on b
1763 -xxxxxxx... 1st on a</tt></pre>
1764 </div></div>
1765 </dd>
1766 <dt class="hdlist1">
1767 --graph
1768 </dt>
1769 <dd>
1771 Draw a text-based graphical representation of the commit history
1772 on the left hand side of the output. This may cause extra lines
1773 to be printed in between commits, in order for the graph history
1774 to be drawn properly.
1775 </p>
1776 <div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
1777 <div class="paragraph"><p>This implies the <em>--topo-order</em> option by default, but the
1778 <em>--date-order</em> option may also be specified.</p></div>
1779 </dd>
1780 <dt class="hdlist1">
1781 --count
1782 </dt>
1783 <dd>
1785 Print a number stating how many commits would have been
1786 listed, and suppress all other output. When used together
1787 with <em>--left-right</em>, instead print the counts for left and
1788 right commits, separated by a tab. When used together with
1789 <em>--cherry-mark</em>, omit patch equivalent commits from these
1790 counts and print the count for equivalent commits separated
1791 by a tab.
1792 </p>
1793 </dd>
1794 </dl></div>
1795 </div>
1796 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
1797 <div class="sectionbody">
1798 <div class="paragraph"><p>If the commit is a merge, and if the pretty-format
1799 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
1800 inserted before the <em>Author:</em> line. This line begins with
1801 "Merge: " and the sha1s of ancestral commits are printed,
1802 separated by spaces. Note that the listed commits may not
1803 necessarily be the list of the <strong>direct</strong> parent commits if you
1804 have limited your view of history: for example, if you are
1805 only interested in changes related to a certain directory or
1806 file.</p></div>
1807 <div class="paragraph"><p>There are several built-in formats, and you can define
1808 additional formats by setting a pretty.&lt;name&gt;
1809 config option to either another format name, or a
1810 <em>format:</em> string, as described below (see
1811 <a href="git-config.html">git-config(1)</a>). Here are the details of the
1812 built-in formats:</p></div>
1813 <div class="ulist"><ul>
1814 <li>
1816 <em>oneline</em>
1817 </p>
1818 <div class="literalblock">
1819 <div class="content">
1820 <pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
1821 </div></div>
1822 <div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
1823 </li>
1824 <li>
1826 <em>short</em>
1827 </p>
1828 <div class="literalblock">
1829 <div class="content">
1830 <pre><tt>commit &lt;sha1&gt;
1831 Author: &lt;author&gt;</tt></pre>
1832 </div></div>
1833 <div class="literalblock">
1834 <div class="content">
1835 <pre><tt>&lt;title line&gt;</tt></pre>
1836 </div></div>
1837 </li>
1838 <li>
1840 <em>medium</em>
1841 </p>
1842 <div class="literalblock">
1843 <div class="content">
1844 <pre><tt>commit &lt;sha1&gt;
1845 Author: &lt;author&gt;
1846 Date: &lt;author date&gt;</tt></pre>
1847 </div></div>
1848 <div class="literalblock">
1849 <div class="content">
1850 <pre><tt>&lt;title line&gt;</tt></pre>
1851 </div></div>
1852 <div class="literalblock">
1853 <div class="content">
1854 <pre><tt>&lt;full commit message&gt;</tt></pre>
1855 </div></div>
1856 </li>
1857 <li>
1859 <em>full</em>
1860 </p>
1861 <div class="literalblock">
1862 <div class="content">
1863 <pre><tt>commit &lt;sha1&gt;
1864 Author: &lt;author&gt;
1865 Commit: &lt;committer&gt;</tt></pre>
1866 </div></div>
1867 <div class="literalblock">
1868 <div class="content">
1869 <pre><tt>&lt;title line&gt;</tt></pre>
1870 </div></div>
1871 <div class="literalblock">
1872 <div class="content">
1873 <pre><tt>&lt;full commit message&gt;</tt></pre>
1874 </div></div>
1875 </li>
1876 <li>
1878 <em>fuller</em>
1879 </p>
1880 <div class="literalblock">
1881 <div class="content">
1882 <pre><tt>commit &lt;sha1&gt;
1883 Author: &lt;author&gt;
1884 AuthorDate: &lt;author date&gt;
1885 Commit: &lt;committer&gt;
1886 CommitDate: &lt;committer date&gt;</tt></pre>
1887 </div></div>
1888 <div class="literalblock">
1889 <div class="content">
1890 <pre><tt>&lt;title line&gt;</tt></pre>
1891 </div></div>
1892 <div class="literalblock">
1893 <div class="content">
1894 <pre><tt>&lt;full commit message&gt;</tt></pre>
1895 </div></div>
1896 </li>
1897 <li>
1899 <em>email</em>
1900 </p>
1901 <div class="literalblock">
1902 <div class="content">
1903 <pre><tt>From &lt;sha1&gt; &lt;date&gt;
1904 From: &lt;author&gt;
1905 Date: &lt;author date&gt;
1906 Subject: [PATCH] &lt;title line&gt;</tt></pre>
1907 </div></div>
1908 <div class="literalblock">
1909 <div class="content">
1910 <pre><tt>&lt;full commit message&gt;</tt></pre>
1911 </div></div>
1912 </li>
1913 <li>
1915 <em>raw</em>
1916 </p>
1917 <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
1918 stored in the commit object. Notably, the SHA1s are
1919 displayed in full, regardless of whether --abbrev or
1920 --no-abbrev are used, and <em>parents</em> information show the
1921 true parent commits, without taking grafts nor history
1922 simplification into account.</p></div>
1923 </li>
1924 <li>
1926 <em>format:&lt;string&gt;</em>
1927 </p>
1928 <div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
1929 you want to show. It works a little bit like printf format,
1930 with the notable exception that you get a newline with <em>%n</em>
1931 instead of <em>\n</em>.</p></div>
1932 <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>
1933 would show something like this:</p></div>
1934 <div class="listingblock">
1935 <div class="content">
1936 <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
1937 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</tt></pre>
1938 </div></div>
1939 <div class="paragraph"><p>The placeholders are:</p></div>
1940 <div class="ulist"><ul>
1941 <li>
1943 <em>%H</em>: commit hash
1944 </p>
1945 </li>
1946 <li>
1948 <em>%h</em>: abbreviated commit hash
1949 </p>
1950 </li>
1951 <li>
1953 <em>%T</em>: tree hash
1954 </p>
1955 </li>
1956 <li>
1958 <em>%t</em>: abbreviated tree hash
1959 </p>
1960 </li>
1961 <li>
1963 <em>%P</em>: parent hashes
1964 </p>
1965 </li>
1966 <li>
1968 <em>%p</em>: abbreviated parent hashes
1969 </p>
1970 </li>
1971 <li>
1973 <em>%an</em>: author name
1974 </p>
1975 </li>
1976 <li>
1978 <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>)
1979 </p>
1980 </li>
1981 <li>
1983 <em>%ae</em>: author email
1984 </p>
1985 </li>
1986 <li>
1988 <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>)
1989 </p>
1990 </li>
1991 <li>
1993 <em>%ad</em>: author date (format respects --date= option)
1994 </p>
1995 </li>
1996 <li>
1998 <em>%aD</em>: author date, RFC2822 style
1999 </p>
2000 </li>
2001 <li>
2003 <em>%ar</em>: author date, relative
2004 </p>
2005 </li>
2006 <li>
2008 <em>%at</em>: author date, UNIX timestamp
2009 </p>
2010 </li>
2011 <li>
2013 <em>%ai</em>: author date, ISO 8601 format
2014 </p>
2015 </li>
2016 <li>
2018 <em>%cn</em>: committer name
2019 </p>
2020 </li>
2021 <li>
2023 <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>)
2024 </p>
2025 </li>
2026 <li>
2028 <em>%ce</em>: committer email
2029 </p>
2030 </li>
2031 <li>
2033 <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>)
2034 </p>
2035 </li>
2036 <li>
2038 <em>%cd</em>: committer date
2039 </p>
2040 </li>
2041 <li>
2043 <em>%cD</em>: committer date, RFC2822 style
2044 </p>
2045 </li>
2046 <li>
2048 <em>%cr</em>: committer date, relative
2049 </p>
2050 </li>
2051 <li>
2053 <em>%ct</em>: committer date, UNIX timestamp
2054 </p>
2055 </li>
2056 <li>
2058 <em>%ci</em>: committer date, ISO 8601 format
2059 </p>
2060 </li>
2061 <li>
2063 <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
2064 </p>
2065 </li>
2066 <li>
2068 <em>%e</em>: encoding
2069 </p>
2070 </li>
2071 <li>
2073 <em>%s</em>: subject
2074 </p>
2075 </li>
2076 <li>
2078 <em>%f</em>: sanitized subject line, suitable for a filename
2079 </p>
2080 </li>
2081 <li>
2083 <em>%b</em>: body
2084 </p>
2085 </li>
2086 <li>
2088 <em>%B</em>: raw body (unwrapped subject and body)
2089 </p>
2090 </li>
2091 <li>
2093 <em>%N</em>: commit notes
2094 </p>
2095 </li>
2096 <li>
2098 <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
2099 </p>
2100 </li>
2101 <li>
2103 <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
2104 </p>
2105 </li>
2106 <li>
2108 <em>%gs</em>: reflog subject
2109 </p>
2110 </li>
2111 <li>
2113 <em>%Cred</em>: switch color to red
2114 </p>
2115 </li>
2116 <li>
2118 <em>%Cgreen</em>: switch color to green
2119 </p>
2120 </li>
2121 <li>
2123 <em>%Cblue</em>: switch color to blue
2124 </p>
2125 </li>
2126 <li>
2128 <em>%Creset</em>: reset color
2129 </p>
2130 </li>
2131 <li>
2133 <em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
2134 </p>
2135 </li>
2136 <li>
2138 <em>%m</em>: left, right or boundary mark
2139 </p>
2140 </li>
2141 <li>
2143 <em>%n</em>: newline
2144 </p>
2145 </li>
2146 <li>
2148 <em>%%</em>: a raw <em>%</em>
2149 </p>
2150 </li>
2151 <li>
2153 <em>%x00</em>: print a byte from a hex code
2154 </p>
2155 </li>
2156 <li>
2158 <em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
2159 <a href="git-shortlog.html">git-shortlog(1)</a>.
2160 </p>
2161 </li>
2162 </ul></div>
2163 </li>
2164 </ul></div>
2165 <div class="admonitionblock">
2166 <table><tr>
2167 <td class="icon">
2168 <div class="title">Note</div>
2169 </td>
2170 <td class="content">Some placeholders may depend on other options given to the
2171 revision traversal engine. For example, the <tt>%g*</tt> reflog options will
2172 insert an empty string unless we are traversing reflog entries (e.g., by
2173 <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
2174 format if <tt>--decorate</tt> was not already provided on the command line.</td>
2175 </tr></table>
2176 </div>
2177 <div class="paragraph"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
2178 is inserted immediately before the expansion if and only if the
2179 placeholder expands to a non-empty string.</p></div>
2180 <div class="paragraph"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
2181 immediately precede the expansion are deleted if and only if the
2182 placeholder expands to an empty string.</p></div>
2183 <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
2184 is inserted immediately before the expansion if and only if the
2185 placeholder expands to a non-empty string.</p></div>
2186 <div class="ulist"><ul>
2187 <li>
2189 <em>tformat:</em>
2190 </p>
2191 <div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
2192 provides "terminator" semantics instead of "separator" semantics. In
2193 other words, each commit has the message terminator character (usually a
2194 newline) appended, rather than a separator placed between entries.
2195 This means that the final entry of a single-line format will be properly
2196 terminated with a new line, just as the "oneline" format does.
2197 For example:</p></div>
2198 <div class="listingblock">
2199 <div class="content">
2200 <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
2201 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
2202 4da45be
2203 7134973 -- NO NEWLINE
2205 $ git log -2 --pretty=tformat:%h 4da45bef \
2206 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
2207 4da45be
2208 7134973</tt></pre>
2209 </div></div>
2210 <div class="paragraph"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
2211 as if it has <tt>tformat:</tt> in front of it. For example, these two are
2212 equivalent:</p></div>
2213 <div class="listingblock">
2214 <div class="content">
2215 <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
2216 $ git log -2 --pretty=%h 4da45bef</tt></pre>
2217 </div></div>
2218 </li>
2219 </ul></div>
2220 </div>
2221 <h2 id="_git">GIT</h2>
2222 <div class="sectionbody">
2223 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
2224 </div>
2225 </div>
2226 <div id="footnotes"><hr /></div>
2227 <div id="footer">
2228 <div id="footer-text">
2229 Last updated 2011-09-21 23:01:14 PDT
2230 </div>
2231 </div>
2232 </body>
2233 </html>