Autogenerated HTML docs for v2.44.0-591-g8f758
[git-htmldocs.git] / git-shortlog.html
blobf6f854d0d831fb7b1e47d818ca30ddb00987e386
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
7 <meta name="generator" content="AsciiDoc 10.2.0" />
8 <title>git-shortlog(1)</title>
9 <style type="text/css">
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
12 /* Default font. */
13 body {
14 font-family: Georgia,serif;
17 /* Title font. */
18 h1, h2, h3, h4, h5, h6,
19 div.title, caption.title,
20 thead, p.table.header,
21 #toctitle,
22 #author, #revnumber, #revdate, #revremark,
23 #footer {
24 font-family: Arial,Helvetica,sans-serif;
27 body {
28 margin: 1em 5% 1em 5%;
31 a {
32 color: blue;
33 text-decoration: underline;
35 a:visited {
36 color: fuchsia;
39 em {
40 font-style: italic;
41 color: navy;
44 strong {
45 font-weight: bold;
46 color: #083194;
49 h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
51 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
56 h1, h2, h3 {
57 border-bottom: 2px solid silver;
59 h2 {
60 padding-top: 0.5em;
62 h3 {
63 float: left;
65 h3 + * {
66 clear: left;
68 h5 {
69 font-size: 1.0em;
72 div.sectionbody {
73 margin-left: 0;
76 hr {
77 border: 1px solid silver;
80 p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
85 ul, ol, li > p {
86 margin-top: 0;
88 ul > li { color: #aaa; }
89 ul > li > * { color: black; }
91 .monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
95 padding: 0;
96 margin: 0;
98 pre {
99 white-space: pre-wrap;
102 #author {
103 color: #527bbd;
104 font-weight: bold;
105 font-size: 1.1em;
107 #email {
109 #revnumber, #revdate, #revremark {
112 #footer {
113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
118 #footer-text {
119 float: left;
120 padding-bottom: 0.5em;
122 #footer-badges {
123 float: right;
124 padding-bottom: 0.5em;
127 #preamble {
128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
131 div.imageblock, div.exampleblock, div.verseblock,
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133 div.admonitionblock {
134 margin-top: 1.0em;
135 margin-bottom: 1.5em;
137 div.admonitionblock {
138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
144 div.content { /* Block element content. */
145 padding: 0;
148 /* Block element titles. */
149 div.title, caption.title {
150 color: #527bbd;
151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
156 div.title + * {
157 margin-top: 0;
160 td div.title:first-child {
161 margin-top: 0.0em;
163 div.content div.title:first-child {
164 margin-top: 0.0em;
166 div.content + div.title {
167 margin-top: 0.0em;
170 div.sidebarblock > div.content {
171 background: #ffffee;
172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
174 padding: 0.5em;
177 div.listingblock > div.content {
178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
181 padding: 0.5em;
184 div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
187 margin-right: 10%;
188 border-left: 5px solid #f0f0f0;
189 color: #888;
192 div.quoteblock > div.attribution {
193 padding-top: 0.5em;
194 text-align: right;
197 div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
201 div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
205 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
206 div.verseblock + div.attribution {
207 text-align: left;
210 div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
218 div.admonitionblock td.content {
219 padding-left: 0.5em;
220 border-left: 3px solid #dddddd;
223 div.exampleblock > div.content {
224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
228 div.imageblock div.content { padding-left: 0; }
229 span.image img { border-style: none; vertical-align: text-bottom; }
230 a.image:visited { color: white; }
232 dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
236 dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
239 font-style: normal;
240 color: navy;
242 dd > *:first-child {
243 margin-top: 0.1em;
246 ul, ol {
247 list-style-position: outside;
249 ol.arabic {
250 list-style-type: decimal;
252 ol.loweralpha {
253 list-style-type: lower-alpha;
255 ol.upperalpha {
256 list-style-type: upper-alpha;
258 ol.lowerroman {
259 list-style-type: lower-roman;
261 ol.upperroman {
262 list-style-type: upper-roman;
265 div.compact ul, div.compact ol,
266 div.compact p, div.compact p,
267 div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
272 tfoot {
273 font-weight: bold;
275 td > div.verse {
276 white-space: pre;
279 div.hdlist {
280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
283 div.hdlist tr {
284 padding-bottom: 15px;
286 dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
289 td.hdlist1 {
290 vertical-align: top;
291 font-style: normal;
292 padding-right: 0.8em;
293 color: navy;
295 td.hdlist2 {
296 vertical-align: top;
298 div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
303 .comment {
304 background: yellow;
307 .footnote, .footnoteref {
308 font-size: 0.8em;
311 span.footnote, span.footnoteref {
312 vertical-align: super;
315 #footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
320 #footnotes div.footnote {
321 margin: 0 0 5px 0;
324 #footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
334 div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
339 div.colist td img {
340 margin-top: 0.3em;
343 @media print {
344 #footer-badges { display: none; }
347 #toc {
348 margin-bottom: 2.5em;
351 #toctitle {
352 color: #527bbd;
353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
360 margin-top: 0;
361 margin-bottom: 0;
363 div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
367 div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
371 div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
376 span.aqua { color: aqua; }
377 span.black { color: black; }
378 span.blue { color: blue; }
379 span.fuchsia { color: fuchsia; }
380 span.gray { color: gray; }
381 span.green { color: green; }
382 span.lime { color: lime; }
383 span.maroon { color: maroon; }
384 span.navy { color: navy; }
385 span.olive { color: olive; }
386 span.purple { color: purple; }
387 span.red { color: red; }
388 span.silver { color: silver; }
389 span.teal { color: teal; }
390 span.white { color: white; }
391 span.yellow { color: yellow; }
393 span.aqua-background { background: aqua; }
394 span.black-background { background: black; }
395 span.blue-background { background: blue; }
396 span.fuchsia-background { background: fuchsia; }
397 span.gray-background { background: gray; }
398 span.green-background { background: green; }
399 span.lime-background { background: lime; }
400 span.maroon-background { background: maroon; }
401 span.navy-background { background: navy; }
402 span.olive-background { background: olive; }
403 span.purple-background { background: purple; }
404 span.red-background { background: red; }
405 span.silver-background { background: silver; }
406 span.teal-background { background: teal; }
407 span.white-background { background: white; }
408 span.yellow-background { background: yellow; }
410 span.big { font-size: 2em; }
411 span.small { font-size: 0.6em; }
413 span.underline { text-decoration: underline; }
414 span.overline { text-decoration: overline; }
415 span.line-through { text-decoration: line-through; }
417 div.unbreakable { page-break-inside: avoid; }
421 * xhtml11 specific
423 * */
425 div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
429 div.tableblock > table {
430 border: 3px solid #527bbd;
432 thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
436 p.table {
437 margin-top: 0;
439 /* Because the table frame attribute is overridden by CSS in most browsers. */
440 div.tableblock > table[frame="void"] {
441 border-style: none;
443 div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
447 div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
454 * html5 specific
456 * */
458 table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
462 thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
466 p.tableblock {
467 margin-top: 0;
469 table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
476 th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
483 table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
487 table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
491 table.tableblock.frame-none {
492 border-style: hidden;
495 th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
498 th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
501 th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
505 th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
517 * manpage specific
519 * */
521 body.manpage h1 {
522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
527 body.manpage h2 {
528 border-style: none;
530 body.manpage div.sectionbody {
531 margin-left: 3em;
534 @media print {
535 body.manpage div#toc { display: none; }
539 </style>
540 <script type="text/javascript">
541 /*<![CDATA[*/
542 var asciidoc = { // Namespace.
544 /////////////////////////////////////////////////////////////////////
545 // Table Of Contents generator
546 /////////////////////////////////////////////////////////////////////
548 /* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
551 * Table Of Content generator
552 * Version: 0.4
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
561 // toclevels = 1..4.
562 toc: function (toclevels) {
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
572 return text;
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
594 iterate(i);
598 iterate(el);
599 return result;
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
640 /////////////////////////////////////////////////////////////////////
641 // Footnotes generator
642 /////////////////////////////////////////////////////////////////////
644 /* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
648 footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
708 install: function(toclevels) {
709 var timerId;
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
731 asciidoc.install();
732 /*]]>*/
733 </script>
734 </head>
735 <body class="manpage">
736 <div id="header">
737 <h1>
738 git-shortlog(1) Manual Page
739 </h1>
740 <h2>NAME</h2>
741 <div class="sectionbody">
742 <p>git-shortlog -
743 Summarize 'git log' output
744 </p>
745 </div>
746 </div>
747 <div id="content">
748 <div class="sect1">
749 <h2 id="_synopsis">SYNOPSIS</h2>
750 <div class="sectionbody">
751 <div class="verseblock">
752 <pre class="content"><em>git shortlog</em> [&lt;options&gt;] [&lt;revision-range&gt;] [[--] &lt;path&gt;&#8230;]
753 git log --pretty=short | <em>git shortlog</em> [&lt;options&gt;]</pre>
754 <div class="attribution">
755 </div></div>
756 </div>
757 </div>
758 <div class="sect1">
759 <h2 id="_description">DESCRIPTION</h2>
760 <div class="sectionbody">
761 <div class="paragraph"><p>Summarizes <em>git log</em> output in a format suitable for inclusion
762 in release announcements. Each commit will be grouped by author and title.</p></div>
763 <div class="paragraph"><p>Additionally, "[PATCH]" will be stripped from the commit description.</p></div>
764 <div class="paragraph"><p>If no revisions are passed on the command line and either standard input
765 is not a terminal or there is no current branch, <em>git shortlog</em> will
766 output a summary of the log read from standard input, without
767 reference to the current repository.</p></div>
768 </div>
769 </div>
770 <div class="sect1">
771 <h2 id="_options">OPTIONS</h2>
772 <div class="sectionbody">
773 <div class="dlist"><dl>
774 <dt class="hdlist1">
776 </dt>
777 <dt class="hdlist1">
778 --numbered
779 </dt>
780 <dd>
782 Sort output according to the number of commits per author instead
783 of author alphabetic order.
784 </p>
785 </dd>
786 <dt class="hdlist1">
788 </dt>
789 <dt class="hdlist1">
790 --summary
791 </dt>
792 <dd>
794 Suppress commit description and provide a commit count summary only.
795 </p>
796 </dd>
797 <dt class="hdlist1">
799 </dt>
800 <dt class="hdlist1">
801 --email
802 </dt>
803 <dd>
805 Show the email address of each author.
806 </p>
807 </dd>
808 <dt class="hdlist1">
809 --format[=&lt;format&gt;]
810 </dt>
811 <dd>
813 Instead of the commit subject, use some other information to
814 describe each commit. <em>&lt;format&gt;</em> can be any string accepted
815 by the <code>--format</code> option of <em>git log</em>, such as <em>* [%h] %s</em>.
816 (See the "PRETTY FORMATS" section of <a href="git-log.html">git-log(1)</a>.)
817 </p>
818 <div class="literalblock">
819 <div class="content">
820 <pre><code>Each pretty-printed commit will be rewrapped before it is shown.</code></pre>
821 </div></div>
822 </dd>
823 <dt class="hdlist1">
824 --date=&lt;format&gt;
825 </dt>
826 <dd>
828 Show dates formatted according to the given date string. (See
829 the <code>--date</code> option in the "Commit Formatting" section of
830 <a href="git-log.html">git-log(1)</a>). Useful with <code>--group=format:&lt;format&gt;</code>.
831 </p>
832 </dd>
833 <dt class="hdlist1">
834 --group=&lt;type&gt;
835 </dt>
836 <dd>
838 Group commits based on <code>&lt;type&gt;</code>. If no <code>--group</code> option is
839 specified, the default is <code>author</code>. <code>&lt;type&gt;</code> is one of:
840 </p>
841 <div class="openblock">
842 <div class="content">
843 <div class="ulist"><ul>
844 <li>
846 <code>author</code>, commits are grouped by author
847 </p>
848 </li>
849 <li>
851 <code>committer</code>, commits are grouped by committer (the same as <code>-c</code>)
852 </p>
853 </li>
854 <li>
856 <code>trailer:&lt;field&gt;</code>, the <code>&lt;field&gt;</code> is interpreted as a case-insensitive
857 commit message trailer (see <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>). For
858 example, if your project uses <code>Reviewed-by</code> trailers, you might want
859 to see who has been reviewing with
860 <code>git shortlog -ns --group=trailer:reviewed-by</code>.
861 </p>
862 </li>
863 <li>
865 <code>format:&lt;format&gt;</code>, any string accepted by the <code>--format</code> option of
866 <em>git log</em>. (See the "PRETTY FORMATS" section of
867 <a href="git-log.html">git-log(1)</a>.)
868 </p>
869 <div class="paragraph"><p>Note that commits that do not include the trailer will not be counted.
870 Likewise, commits with multiple trailers (e.g., multiple signoffs) may
871 be counted more than once (but only once per unique trailer value in
872 that commit).</p></div>
873 <div class="paragraph"><p>Shortlog will attempt to parse each trailer value as a <code>name &lt;email&gt;</code>
874 identity. If successful, the mailmap is applied and the email is omitted
875 unless the <code>--email</code> option is specified. If the value cannot be parsed
876 as an identity, it will be taken literally and completely.</p></div>
877 </li>
878 </ul></div>
879 </div></div>
880 <div class="paragraph"><p>If <code>--group</code> is specified multiple times, commits are counted under each
881 value (but again, only once per unique value in that commit). For
882 example, <code>git shortlog --group=author --group=trailer:co-authored-by</code>
883 counts both authors and co-authors.</p></div>
884 </dd>
885 <dt class="hdlist1">
887 </dt>
888 <dt class="hdlist1">
889 --committer
890 </dt>
891 <dd>
893 This is an alias for <code>--group=committer</code>.
894 </p>
895 </dd>
896 <dt class="hdlist1">
897 -w[&lt;width&gt;[,&lt;indent1&gt;[,&lt;indent2&gt;]]]
898 </dt>
899 <dd>
901 Linewrap the output by wrapping each line at <code>width</code>. The first
902 line of each entry is indented by <code>indent1</code> spaces, and the second
903 and subsequent lines are indented by <code>indent2</code> spaces. <code>width</code>,
904 <code>indent1</code>, and <code>indent2</code> default to 76, 6 and 9 respectively.
905 </p>
906 <div class="paragraph"><p>If width is <code>0</code> (zero) then indent the lines of the output without wrapping
907 them.</p></div>
908 </dd>
909 <dt class="hdlist1">
910 &lt;revision-range&gt;
911 </dt>
912 <dd>
914 Show only commits in the specified revision range. When no
915 &lt;revision-range&gt; is specified, it defaults to <code>HEAD</code> (i.e. the
916 whole history leading to the current commit). <code>origin..HEAD</code>
917 specifies all the commits reachable from the current commit
918 (i.e. <code>HEAD</code>), but not from <code>origin</code>. For a complete list of
919 ways to spell &lt;revision-range&gt;, see the "Specifying Ranges"
920 section of <a href="gitrevisions.html">gitrevisions(7)</a>.
921 </p>
922 </dd>
923 <dt class="hdlist1">
924 [--] &lt;path&gt;&#8230;
925 </dt>
926 <dd>
928 Consider only commits that are enough to explain how the files
929 that match the specified paths came to be.
930 </p>
931 <div class="paragraph"><p>Paths may need to be prefixed with <code>--</code> to separate them from
932 options or the revision range, when confusion arises.</p></div>
933 </dd>
934 </dl></div>
935 <div class="sect2">
936 <h3 id="_commit_limiting">Commit Limiting</h3>
937 <div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
938 special notations explained in the description, additional commit
939 limiting may be applied.</p></div>
940 <div class="paragraph"><p>Using more options generally further limits the output (e.g.
941 <code>--since=&lt;date1&gt;</code> limits to commits newer than <code>&lt;date1&gt;</code>, and using it
942 with <code>--grep=&lt;pattern&gt;</code> further limits to commits whose log message
943 has a line that matches <code>&lt;pattern&gt;</code>), unless otherwise noted.</p></div>
944 <div class="paragraph"><p>Note that these are applied before commit
945 ordering and formatting options, such as <code>--reverse</code>.</p></div>
946 <div class="dlist"><dl>
947 <dt class="hdlist1">
948 -&lt;number&gt;
949 </dt>
950 <dt class="hdlist1">
951 -n &lt;number&gt;
952 </dt>
953 <dt class="hdlist1">
954 --max-count=&lt;number&gt;
955 </dt>
956 <dd>
958 Limit the number of commits to output.
959 </p>
960 </dd>
961 <dt class="hdlist1">
962 --skip=&lt;number&gt;
963 </dt>
964 <dd>
966 Skip <em>number</em> commits before starting to show the commit output.
967 </p>
968 </dd>
969 <dt class="hdlist1">
970 --since=&lt;date&gt;
971 </dt>
972 <dt class="hdlist1">
973 --after=&lt;date&gt;
974 </dt>
975 <dd>
977 Show commits more recent than a specific date.
978 </p>
979 </dd>
980 <dt class="hdlist1">
981 --since-as-filter=&lt;date&gt;
982 </dt>
983 <dd>
985 Show all commits more recent than a specific date. This visits
986 all commits in the range, rather than stopping at the first commit which
987 is older than a specific date.
988 </p>
989 </dd>
990 <dt class="hdlist1">
991 --until=&lt;date&gt;
992 </dt>
993 <dt class="hdlist1">
994 --before=&lt;date&gt;
995 </dt>
996 <dd>
998 Show commits older than a specific date.
999 </p>
1000 </dd>
1001 <dt class="hdlist1">
1002 --author=&lt;pattern&gt;
1003 </dt>
1004 <dt class="hdlist1">
1005 --committer=&lt;pattern&gt;
1006 </dt>
1007 <dd>
1009 Limit the commits output to ones with author/committer
1010 header lines that match the specified pattern (regular
1011 expression). With more than one <code>--author=&lt;pattern&gt;</code>,
1012 commits whose author matches any of the given patterns are
1013 chosen (similarly for multiple <code>--committer=&lt;pattern&gt;</code>).
1014 </p>
1015 </dd>
1016 <dt class="hdlist1">
1017 --grep-reflog=&lt;pattern&gt;
1018 </dt>
1019 <dd>
1021 Limit the commits output to ones with reflog entries that
1022 match the specified pattern (regular expression). With
1023 more than one <code>--grep-reflog</code>, commits whose reflog message
1024 matches any of the given patterns are chosen. It is an
1025 error to use this option unless <code>--walk-reflogs</code> is in use.
1026 </p>
1027 </dd>
1028 <dt class="hdlist1">
1029 --grep=&lt;pattern&gt;
1030 </dt>
1031 <dd>
1033 Limit the commits output to ones with a log message that
1034 matches the specified pattern (regular expression). With
1035 more than one <code>--grep=&lt;pattern&gt;</code>, commits whose message
1036 matches any of the given patterns are chosen (but see
1037 <code>--all-match</code>).
1038 </p>
1039 <div class="paragraph"><p>When <code>--notes</code> is in effect, the message from the notes is
1040 matched as if it were part of the log message.</p></div>
1041 </dd>
1042 <dt class="hdlist1">
1043 --all-match
1044 </dt>
1045 <dd>
1047 Limit the commits output to ones that match all given <code>--grep</code>,
1048 instead of ones that match at least one.
1049 </p>
1050 </dd>
1051 <dt class="hdlist1">
1052 --invert-grep
1053 </dt>
1054 <dd>
1056 Limit the commits output to ones with a log message that do not
1057 match the pattern specified with <code>--grep=&lt;pattern&gt;</code>.
1058 </p>
1059 </dd>
1060 <dt class="hdlist1">
1062 </dt>
1063 <dt class="hdlist1">
1064 --regexp-ignore-case
1065 </dt>
1066 <dd>
1068 Match the regular expression limiting patterns without regard to letter
1069 case.
1070 </p>
1071 </dd>
1072 <dt class="hdlist1">
1073 --basic-regexp
1074 </dt>
1075 <dd>
1077 Consider the limiting patterns to be basic regular expressions;
1078 this is the default.
1079 </p>
1080 </dd>
1081 <dt class="hdlist1">
1083 </dt>
1084 <dt class="hdlist1">
1085 --extended-regexp
1086 </dt>
1087 <dd>
1089 Consider the limiting patterns to be extended regular expressions
1090 instead of the default basic regular expressions.
1091 </p>
1092 </dd>
1093 <dt class="hdlist1">
1095 </dt>
1096 <dt class="hdlist1">
1097 --fixed-strings
1098 </dt>
1099 <dd>
1101 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
1102 pattern as a regular expression).
1103 </p>
1104 </dd>
1105 <dt class="hdlist1">
1107 </dt>
1108 <dt class="hdlist1">
1109 --perl-regexp
1110 </dt>
1111 <dd>
1113 Consider the limiting patterns to be Perl-compatible regular
1114 expressions.
1115 </p>
1116 <div class="paragraph"><p>Support for these types of regular expressions is an optional
1117 compile-time dependency. If Git wasn&#8217;t compiled with support for them
1118 providing this option will cause it to die.</p></div>
1119 </dd>
1120 <dt class="hdlist1">
1121 --remove-empty
1122 </dt>
1123 <dd>
1125 Stop when a given path disappears from the tree.
1126 </p>
1127 </dd>
1128 <dt class="hdlist1">
1129 --merges
1130 </dt>
1131 <dd>
1133 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
1134 </p>
1135 </dd>
1136 <dt class="hdlist1">
1137 --no-merges
1138 </dt>
1139 <dd>
1141 Do not print commits with more than one parent. This is
1142 exactly the same as <code>--max-parents=1</code>.
1143 </p>
1144 </dd>
1145 <dt class="hdlist1">
1146 --min-parents=&lt;number&gt;
1147 </dt>
1148 <dt class="hdlist1">
1149 --max-parents=&lt;number&gt;
1150 </dt>
1151 <dt class="hdlist1">
1152 --no-min-parents
1153 </dt>
1154 <dt class="hdlist1">
1155 --no-max-parents
1156 </dt>
1157 <dd>
1159 Show only commits which have at least (or at most) that many parent
1160 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1161 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1162 gives all root commits and <code>--min-parents=3</code> all octopus merges.
1163 </p>
1164 <div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1165 again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1166 parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
1167 </dd>
1168 <dt class="hdlist1">
1169 --first-parent
1170 </dt>
1171 <dd>
1173 When finding commits to include, follow only the first
1174 parent commit upon seeing a merge commit. This option
1175 can give a better overview when viewing the evolution of
1176 a particular topic branch, because merges into a topic
1177 branch tend to be only about adjusting to updated upstream
1178 from time to time, and this option allows you to ignore
1179 the individual commits brought in to your history by such
1180 a merge.
1181 </p>
1182 </dd>
1183 <dt class="hdlist1">
1184 --exclude-first-parent-only
1185 </dt>
1186 <dd>
1188 When finding commits to exclude (with a <em>&#94;</em>), follow only
1189 the first parent commit upon seeing a merge commit.
1190 This can be used to find the set of changes in a topic branch
1191 from the point where it diverged from the remote branch, given
1192 that arbitrary merges can be valid topic branch changes.
1193 </p>
1194 </dd>
1195 <dt class="hdlist1">
1196 --not
1197 </dt>
1198 <dd>
1200 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
1201 for all following revision specifiers, up to the next <code>--not</code>.
1202 When used on the command line before --stdin, the revisions passed
1203 through stdin will not be affected by it. Conversely, when passed
1204 via standard input, the revisions passed on the command line will
1205 not be affected by it.
1206 </p>
1207 </dd>
1208 <dt class="hdlist1">
1209 --all
1210 </dt>
1211 <dd>
1213 Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
1214 listed on the command line as <em>&lt;commit&gt;</em>.
1215 </p>
1216 </dd>
1217 <dt class="hdlist1">
1218 --branches[=&lt;pattern&gt;]
1219 </dt>
1220 <dd>
1222 Pretend as if all the refs in <code>refs/heads</code> are listed
1223 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
1224 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
1225 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
1226 </p>
1227 </dd>
1228 <dt class="hdlist1">
1229 --tags[=&lt;pattern&gt;]
1230 </dt>
1231 <dd>
1233 Pretend as if all the refs in <code>refs/tags</code> are listed
1234 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
1235 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1236 or <em>[</em>, <em>/&#42;</em> at the end is implied.
1237 </p>
1238 </dd>
1239 <dt class="hdlist1">
1240 --remotes[=&lt;pattern&gt;]
1241 </dt>
1242 <dd>
1244 Pretend as if all the refs in <code>refs/remotes</code> are listed
1245 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
1246 remote-tracking branches to ones matching given shell glob.
1247 If pattern lacks <em>?</em>, <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
1248 </p>
1249 </dd>
1250 <dt class="hdlist1">
1251 --glob=&lt;glob-pattern&gt;
1252 </dt>
1253 <dd>
1255 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
1256 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
1257 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1258 or <em>[</em>, <em>/&#42;</em> at the end is implied.
1259 </p>
1260 </dd>
1261 <dt class="hdlist1">
1262 --exclude=&lt;glob-pattern&gt;
1263 </dt>
1264 <dd>
1266 Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
1267 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
1268 consider. Repetitions of this option accumulate exclusion patterns
1269 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
1270 <code>--glob</code> option (other options or arguments do not clear
1271 accumulated patterns).
1272 </p>
1273 <div class="paragraph"><p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
1274 <code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
1275 respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
1276 or <code>--all</code>. If a trailing <em>/&#42;</em> is intended, it must be given
1277 explicitly.</p></div>
1278 </dd>
1279 <dt class="hdlist1">
1280 --exclude-hidden=[fetch|receive|uploadpack]
1281 </dt>
1282 <dd>
1284 Do not include refs that would be hidden by <code>git-fetch</code>,
1285 <code>git-receive-pack</code> or <code>git-upload-pack</code> by consulting the appropriate
1286 <code>fetch.hideRefs</code>, <code>receive.hideRefs</code> or <code>uploadpack.hideRefs</code>
1287 configuration along with <code>transfer.hideRefs</code> (see
1288 <a href="git-config.html">git-config(1)</a>). This option affects the next pseudo-ref option
1289 <code>--all</code> or <code>--glob</code> and is cleared after processing them.
1290 </p>
1291 </dd>
1292 <dt class="hdlist1">
1293 --reflog
1294 </dt>
1295 <dd>
1297 Pretend as if all objects mentioned by reflogs are listed on the
1298 command line as <code>&lt;commit&gt;</code>.
1299 </p>
1300 </dd>
1301 <dt class="hdlist1">
1302 --alternate-refs
1303 </dt>
1304 <dd>
1306 Pretend as if all objects mentioned as ref tips of alternate
1307 repositories were listed on the command line. An alternate
1308 repository is any repository whose object directory is specified
1309 in <code>objects/info/alternates</code>. The set of included objects may
1310 be modified by <code>core.alternateRefsCommand</code>, etc. See
1311 <a href="git-config.html">git-config(1)</a>.
1312 </p>
1313 </dd>
1314 <dt class="hdlist1">
1315 --single-worktree
1316 </dt>
1317 <dd>
1319 By default, all working trees will be examined by the
1320 following options when there are more than one (see
1321 <a href="git-worktree.html">git-worktree(1)</a>): <code>--all</code>, <code>--reflog</code> and
1322 <code>--indexed-objects</code>.
1323 This option forces them to examine the current working tree
1324 only.
1325 </p>
1326 </dd>
1327 <dt class="hdlist1">
1328 --ignore-missing
1329 </dt>
1330 <dd>
1332 Upon seeing an invalid object name in the input, pretend as if
1333 the bad input was not given.
1334 </p>
1335 </dd>
1336 <dt class="hdlist1">
1337 --bisect
1338 </dt>
1339 <dd>
1341 Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
1342 was listed and as if it was followed by <code>--not</code> and the good
1343 bisection refs <code>refs/bisect/good-*</code> on the command
1344 line.
1345 </p>
1346 </dd>
1347 <dt class="hdlist1">
1348 --stdin
1349 </dt>
1350 <dd>
1352 In addition to getting arguments from the command line, read
1353 them from standard input as well. This accepts commits and
1354 pseudo-options like <code>--all</code> and <code>--glob=</code>. When a <code>--</code> separator
1355 is seen, the following input is treated as paths and used to
1356 limit the result. Flags like <code>--not</code> which are read via standard input
1357 are only respected for arguments passed in the same way and will not
1358 influence any subsequent command line arguments.
1359 </p>
1360 </dd>
1361 <dt class="hdlist1">
1362 --cherry-mark
1363 </dt>
1364 <dd>
1366 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1367 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
1368 </p>
1369 </dd>
1370 <dt class="hdlist1">
1371 --cherry-pick
1372 </dt>
1373 <dd>
1375 Omit any commit that introduces the same change as
1376 another commit on the &#8220;other side&#8221; when the set of
1377 commits are limited with symmetric difference.
1378 </p>
1379 <div class="paragraph"><p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way
1380 to list all commits on only one side of them is with
1381 <code>--left-right</code> (see the example below in the description of
1382 the <code>--left-right</code> option). However, it shows the commits that were
1383 cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
1384 cherry-picked from branch A). With this option, such pairs of commits are
1385 excluded from the output.</p></div>
1386 </dd>
1387 <dt class="hdlist1">
1388 --left-only
1389 </dt>
1390 <dt class="hdlist1">
1391 --right-only
1392 </dt>
1393 <dd>
1395 List only commits on the respective side of a symmetric difference,
1396 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1397 <code>--left-right</code>.
1398 </p>
1399 <div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1400 commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1401 <code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1402 More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
1403 list.</p></div>
1404 </dd>
1405 <dt class="hdlist1">
1406 --cherry
1407 </dt>
1408 <dd>
1410 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
1411 limit the output to the commits on our side and mark those that
1412 have been applied to the other side of a forked history with
1413 <code>git log --cherry upstream...mybranch</code>, similar to
1414 <code>git cherry upstream mybranch</code>.
1415 </p>
1416 </dd>
1417 <dt class="hdlist1">
1419 </dt>
1420 <dt class="hdlist1">
1421 --walk-reflogs
1422 </dt>
1423 <dd>
1425 Instead of walking the commit ancestry chain, walk
1426 reflog entries from the most recent one to older ones.
1427 When this option is used you cannot specify commits to
1428 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
1429 and <em>commit1...commit2</em> notations cannot be used).
1430 </p>
1431 <div class="paragraph"><p>With <code>--pretty</code> format other than <code>oneline</code> and <code>reference</code> (for obvious reasons),
1432 this causes the output to have two extra lines of information
1433 taken from the reflog. The reflog designator in the output may be shown
1434 as <code>ref@{&lt;Nth&gt;}</code> (where <em>&lt;Nth&gt;</em> is the reverse-chronological index in the
1435 reflog) or as <code>ref@{&lt;timestamp&gt;}</code> (with the <em>&lt;timestamp&gt;</em> for that entry),
1436 depending on a few rules:</p></div>
1437 <div class="openblock">
1438 <div class="content">
1439 <div class="olist arabic"><ol class="arabic">
1440 <li>
1442 If the starting point is specified as <code>ref@{&lt;Nth&gt;}</code>, show the index
1443 format.
1444 </p>
1445 </li>
1446 <li>
1448 If the starting point was specified as <code>ref@{now}</code>, show the
1449 timestamp format.
1450 </p>
1451 </li>
1452 <li>
1454 If neither was used, but <code>--date</code> was given on the command line, show
1455 the timestamp in the format requested by <code>--date</code>.
1456 </p>
1457 </li>
1458 <li>
1460 Otherwise, show the index format.
1461 </p>
1462 </li>
1463 </ol></div>
1464 </div></div>
1465 <div class="paragraph"><p>Under <code>--pretty=oneline</code>, the commit message is
1466 prefixed with this information on the same line.
1467 This option cannot be combined with <code>--reverse</code>.
1468 See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
1469 <div class="paragraph"><p>Under <code>--pretty=reference</code>, this information will not be shown at all.</p></div>
1470 </dd>
1471 <dt class="hdlist1">
1472 --merge
1473 </dt>
1474 <dd>
1476 Show commits touching conflicted paths in the range <code>HEAD...&lt;other&gt;</code>,
1477 where <code>&lt;other&gt;</code> is the first existing pseudoref in <code>MERGE_HEAD</code>,
1478 <code>CHERRY_PICK_HEAD</code>, <code>REVERT_HEAD</code> or <code>REBASE_HEAD</code>. Only works
1479 when the index has unmerged entries. This option can be used to show
1480 relevant commits when resolving conflicts from a 3-way merge.
1481 </p>
1482 </dd>
1483 <dt class="hdlist1">
1484 --boundary
1485 </dt>
1486 <dd>
1488 Output excluded boundary commits. Boundary commits are
1489 prefixed with <code>-</code>.
1490 </p>
1491 </dd>
1492 </dl></div>
1493 </div>
1494 <div class="sect2">
1495 <h3 id="_history_simplification">History Simplification</h3>
1496 <div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
1497 commits modifying a particular &lt;path&gt;. But there are two parts of
1498 <em>History Simplification</em>, one part is selecting the commits and the other
1499 is how to do it, as there are various strategies to simplify the history.</p></div>
1500 <div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1501 <div class="dlist"><dl>
1502 <dt class="hdlist1">
1503 &lt;paths&gt;
1504 </dt>
1505 <dd>
1507 Commits modifying the given &lt;paths&gt; are selected.
1508 </p>
1509 </dd>
1510 <dt class="hdlist1">
1511 --simplify-by-decoration
1512 </dt>
1513 <dd>
1515 Commits that are referred by some branch or tag are selected.
1516 </p>
1517 </dd>
1518 </dl></div>
1519 <div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1520 <div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1521 <div class="dlist"><dl>
1522 <dt class="hdlist1">
1523 Default mode
1524 </dt>
1525 <dd>
1527 Simplifies the history to the simplest history explaining the
1528 final state of the tree. Simplest because it prunes some side
1529 branches if the end result is the same (i.e. merging branches
1530 with the same content)
1531 </p>
1532 </dd>
1533 <dt class="hdlist1">
1534 --show-pulls
1535 </dt>
1536 <dd>
1538 Include all commits from the default mode, but also any merge
1539 commits that are not TREESAME to the first parent but are
1540 TREESAME to a later parent. This mode is helpful for showing
1541 the merge commits that "first introduced" a change to a branch.
1542 </p>
1543 </dd>
1544 <dt class="hdlist1">
1545 --full-history
1546 </dt>
1547 <dd>
1549 Same as the default mode, but does not prune some history.
1550 </p>
1551 </dd>
1552 <dt class="hdlist1">
1553 --dense
1554 </dt>
1555 <dd>
1557 Only the selected commits are shown, plus some to have a
1558 meaningful history.
1559 </p>
1560 </dd>
1561 <dt class="hdlist1">
1562 --sparse
1563 </dt>
1564 <dd>
1566 All commits in the simplified history are shown.
1567 </p>
1568 </dd>
1569 <dt class="hdlist1">
1570 --simplify-merges
1571 </dt>
1572 <dd>
1574 Additional option to <code>--full-history</code> to remove some needless
1575 merges from the resulting history, as there are no selected
1576 commits contributing to this merge.
1577 </p>
1578 </dd>
1579 <dt class="hdlist1">
1580 --ancestry-path[=&lt;commit&gt;]
1581 </dt>
1582 <dd>
1584 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1585 or <em>commit2 &#94;commit1</em>), only display commits in that range
1586 that are ancestors of &lt;commit&gt;, descendants of &lt;commit&gt;, or
1587 &lt;commit&gt; itself. If no commit is specified, use <em>commit1</em> (the
1588 excluded part of the range) as &lt;commit&gt;. Can be passed multiple
1589 times; if so, a commit is included if it is any of the commits
1590 given or if it is an ancestor or descendant of one of them.
1591 </p>
1592 </dd>
1593 </dl></div>
1594 <div class="paragraph"><p>A more detailed explanation follows.</p></div>
1595 <div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1596 that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1597 filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
1598 <div class="paragraph"><p>In the following, we will always refer to the same example history to
1599 illustrate the differences between simplification settings. We assume
1600 that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
1601 <div class="listingblock">
1602 <div class="content">
1603 <pre><code> .-A---M---N---O---P---Q
1604 / / / / / /
1605 I B C D E Y
1606 \ / / / / /
1607 `-------------' X</code></pre>
1608 </div></div>
1609 <div class="paragraph"><p>The horizontal line of history A---Q is taken to be the first parent of
1610 each merge. The commits are:</p></div>
1611 <div class="ulist"><ul>
1612 <li>
1614 <code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1615 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1616 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
1617 </p>
1618 </li>
1619 <li>
1621 In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.
1622 </p>
1623 </li>
1624 <li>
1626 <code>B</code> contains the same change as <code>A</code>. Its merge <code>M</code> is trivial and
1627 hence TREESAME to all parents.
1628 </p>
1629 </li>
1630 <li>
1632 <code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to &#8220;foobar&#8221;,
1633 so it is not TREESAME to any parent.
1634 </p>
1635 </li>
1636 <li>
1638 <code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1639 <code>N</code> and <code>D</code> to &#8220;foobarbaz&#8221;; i.e., it is not TREESAME to any parent.
1640 </p>
1641 </li>
1642 <li>
1644 <code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1645 strings to &#8220;quux xyzzy&#8221;. <code>P</code> is TREESAME to <code>O</code>, but not to <code>E</code>.
1646 </p>
1647 </li>
1648 <li>
1650 <code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1651 modified it. <code>Y</code> is TREESAME to <code>X</code>. Its merge <code>Q</code> added <code>side</code> to <code>P</code>, and
1652 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.
1653 </p>
1654 </li>
1655 </ul></div>
1656 <div class="paragraph"><p><code>rev-list</code> walks backwards through history, including or excluding
1657 commits based on whether <code>--full-history</code> and/or parent rewriting
1658 (via <code>--parents</code> or <code>--children</code>) are used. The following settings
1659 are available.</p></div>
1660 <div class="dlist"><dl>
1661 <dt class="hdlist1">
1662 Default mode
1663 </dt>
1664 <dd>
1666 Commits are included if they are not TREESAME to any parent
1667 (though this can be changed, see <code>--sparse</code> below). If the
1668 commit was a merge, and it was TREESAME to one parent, follow
1669 only that parent. (Even if there are several TREESAME
1670 parents, follow only one of them.) Otherwise, follow all
1671 parents.
1672 </p>
1673 <div class="paragraph"><p>This results in:</p></div>
1674 <div class="listingblock">
1675 <div class="content">
1676 <pre><code> .-A---N---O
1677 / / /
1678 I---------D</code></pre>
1679 </div></div>
1680 <div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
1681 available, removed <code>B</code> from consideration entirely. <code>C</code> was
1682 considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1683 empty tree, so <code>I</code> is !TREESAME.</p></div>
1684 <div class="paragraph"><p>Parent/child relations are only visible with <code>--parents</code>, but that does
1685 not affect the commits selected in default mode, so we have shown the
1686 parent lines.</p></div>
1687 </dd>
1688 <dt class="hdlist1">
1689 --full-history without parent rewriting
1690 </dt>
1691 <dd>
1693 This mode differs from the default in one point: always follow
1694 all parents of a merge, even if it is TREESAME to one of them.
1695 Even if more than one side of the merge has commits that are
1696 included, this does not imply that the merge itself is! In
1697 the example, we get
1698 </p>
1699 <div class="listingblock">
1700 <div class="content">
1701 <pre><code> I A B N D O P Q</code></pre>
1702 </div></div>
1703 <div class="paragraph"><p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1704 <code>C</code> and <code>B</code> were all walked, but only <code>B</code> was !TREESAME, so the others
1705 do not appear.</p></div>
1706 <div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
1707 about the parent/child relationships between the commits, so we show
1708 them disconnected.</p></div>
1709 </dd>
1710 <dt class="hdlist1">
1711 --full-history with parent rewriting
1712 </dt>
1713 <dd>
1715 Ordinary commits are only included if they are !TREESAME
1716 (though this can be changed, see <code>--sparse</code> below).
1717 </p>
1718 <div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
1719 Along each parent, prune away commits that are not included
1720 themselves. This results in</p></div>
1721 <div class="listingblock">
1722 <div class="content">
1723 <pre><code> .-A---M---N---O---P---Q
1724 / / / / /
1725 I B / D /
1726 \ / / / /
1727 `-------------'</code></pre>
1728 </div></div>
1729 <div class="paragraph"><p>Compare to <code>--full-history</code> without rewriting above. Note that <code>E</code>
1730 was pruned away because it is TREESAME, but the parent list of P was
1731 rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1732 <code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p></div>
1733 </dd>
1734 </dl></div>
1735 <div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
1736 affects inclusion:</p></div>
1737 <div class="dlist"><dl>
1738 <dt class="hdlist1">
1739 --dense
1740 </dt>
1741 <dd>
1743 Commits that are walked are included if they are not TREESAME
1744 to any parent.
1745 </p>
1746 </dd>
1747 <dt class="hdlist1">
1748 --sparse
1749 </dt>
1750 <dd>
1752 All commits that are walked are included.
1753 </p>
1754 <div class="paragraph"><p>Note that without <code>--full-history</code>, this still simplifies merges: if
1755 one of the parents is TREESAME, we follow only that one, so the other
1756 sides of the merge are never walked.</p></div>
1757 </dd>
1758 <dt class="hdlist1">
1759 --simplify-merges
1760 </dt>
1761 <dd>
1763 First, build a history graph in the same way that
1764 <code>--full-history</code> with parent rewriting does (see above).
1765 </p>
1766 <div class="paragraph"><p>Then simplify each commit <code>C</code> to its replacement <code>C'</code> in the final
1767 history according to the following rules:</p></div>
1768 <div class="openblock">
1769 <div class="content">
1770 <div class="ulist"><ul>
1771 <li>
1773 Set <code>C'</code> to <code>C</code>.
1774 </p>
1775 </li>
1776 <li>
1778 Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
1779 the process, drop parents that are ancestors of other parents or that are
1780 root commits TREESAME to an empty tree, and remove duplicates, but take care
1781 to never drop all parents that we are TREESAME to.
1782 </p>
1783 </li>
1784 <li>
1786 If after this parent rewriting, <code>C'</code> is a root or merge commit (has
1787 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1788 Otherwise, it is replaced with its only parent.
1789 </p>
1790 </li>
1791 </ul></div>
1792 </div></div>
1793 <div class="paragraph"><p>The effect of this is best shown by way of comparing to
1794 <code>--full-history</code> with parent rewriting. The example turns into:</p></div>
1795 <div class="listingblock">
1796 <div class="content">
1797 <pre><code> .-A---M---N---O
1798 / / /
1799 I B D
1800 \ / /
1801 `---------'</code></pre>
1802 </div></div>
1803 <div class="paragraph"><p>Note the major differences in <code>N</code>, <code>P</code>, and <code>Q</code> over <code>--full-history</code>:</p></div>
1804 <div class="openblock">
1805 <div class="content">
1806 <div class="ulist"><ul>
1807 <li>
1809 <code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1810 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
1811 </p>
1812 </li>
1813 <li>
1815 <code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
1816 removed completely, because it had one parent and is TREESAME.
1817 </p>
1818 </li>
1819 <li>
1821 <code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1822 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
1823 parent and is TREESAME.
1824 </p>
1825 </li>
1826 </ul></div>
1827 </div></div>
1828 </dd>
1829 </dl></div>
1830 <div class="paragraph"><p>There is another simplification mode available:</p></div>
1831 <div class="dlist"><dl>
1832 <dt class="hdlist1">
1833 --ancestry-path[=&lt;commit&gt;]
1834 </dt>
1835 <dd>
1837 Limit the displayed commits to those which are an ancestor of
1838 &lt;commit&gt;, or which are a descendant of &lt;commit&gt;, or are &lt;commit&gt;
1839 itself.
1840 </p>
1841 <div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
1842 <div class="listingblock">
1843 <div class="content">
1844 <pre><code> D---E-------F
1845 / \ \
1846 B---C---G---H---I---J
1848 A-------K---------------L--M</code></pre>
1849 </div></div>
1850 <div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1851 but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1852 what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1853 that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1854 example would be all the commits, except <code>A</code> and <code>B</code> (and <code>D</code> itself,
1855 of course).</p></div>
1856 <div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1857 bug introduced by <code>D</code> and need fixing, however, we might want to view
1858 only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1859 excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
1860 option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1861 <div class="listingblock">
1862 <div class="content">
1863 <pre><code> E-------F
1865 G---H---I---J
1867 L--M</code></pre>
1868 </div></div>
1869 <div class="paragraph"><p>We can also use <code>--ancestry-path=D</code> instead of <code>--ancestry-path</code> which
1870 means the same thing when applied to the <em>D..M</em> range but is just more
1871 explicit.</p></div>
1872 <div class="paragraph"><p>If we instead are interested in a given topic within this range, and all
1873 commits affected by that topic, we may only want to view the subset of
1874 <code>D..M</code> which contain that topic in their ancestry path. So, using
1875 <code>--ancestry-path=H D..M</code> for example would result in:</p></div>
1876 <div class="listingblock">
1877 <div class="content">
1878 <pre><code> E
1880 G---H---I---J
1882 L--M</code></pre>
1883 </div></div>
1884 <div class="paragraph"><p>Whereas <code>--ancestry-path=K D..M</code> would result in</p></div>
1885 <div class="listingblock">
1886 <div class="content">
1887 <pre><code> K---------------L--M</code></pre>
1888 </div></div>
1889 </dd>
1890 </dl></div>
1891 <div class="paragraph"><p>Before discussing another option, <code>--show-pulls</code>, we need to
1892 create a new example history.</p></div>
1893 <div class="paragraph"><p>A common problem users face when looking at simplified history is that a
1894 commit they know changed a file somehow does not appear in the file&#8217;s
1895 simplified history. Let&#8217;s demonstrate a new example and show how options
1896 such as <code>--full-history</code> and <code>--simplify-merges</code> works in that case:</p></div>
1897 <div class="listingblock">
1898 <div class="content">
1899 <pre><code> .-A---M-----C--N---O---P
1900 / / \ \ \/ / /
1901 I B \ R-'`-Z' /
1902 \ / \/ /
1903 \ / /\ /
1904 `---X--' `---Y--'</code></pre>
1905 </div></div>
1906 <div class="paragraph"><p>For this example, suppose <code>I</code> created <code>file.txt</code> which was modified by
1907 <code>A</code>, <code>B</code>, and <code>X</code> in different ways. The single-parent commits <code>C</code>, <code>Z</code>,
1908 and <code>Y</code> do not change <code>file.txt</code>. The merge commit <code>M</code> was created by
1909 resolving the merge conflict to include both changes from <code>A</code> and <code>B</code>
1910 and hence is not TREESAME to either. The merge commit <code>R</code>, however, was
1911 created by ignoring the contents of <code>file.txt</code> at <code>M</code> and taking only
1912 the contents of <code>file.txt</code> at <code>X</code>. Hence, <code>R</code> is TREESAME to <code>X</code> but not
1913 <code>M</code>. Finally, the natural merge resolution to create <code>N</code> is to take the
1914 contents of <code>file.txt</code> at <code>R</code>, so <code>N</code> is TREESAME to <code>R</code> but not <code>C</code>.
1915 The merge commits <code>O</code> and <code>P</code> are TREESAME to their first parents, but
1916 not to their second parents, <code>Z</code> and <code>Y</code> respectively.</p></div>
1917 <div class="paragraph"><p>When using the default mode, <code>N</code> and <code>R</code> both have a TREESAME parent, so
1918 those edges are walked and the others are ignored. The resulting history
1919 graph is:</p></div>
1920 <div class="listingblock">
1921 <div class="content">
1922 <pre><code> I---X</code></pre>
1923 </div></div>
1924 <div class="paragraph"><p>When using <code>--full-history</code>, Git walks every edge. This will discover
1925 the commits <code>A</code> and <code>B</code> and the merge <code>M</code>, but also will reveal the
1926 merge commits <code>O</code> and <code>P</code>. With parent rewriting, the resulting graph is:</p></div>
1927 <div class="listingblock">
1928 <div class="content">
1929 <pre><code> .-A---M--------N---O---P
1930 / / \ \ \/ / /
1931 I B \ R-'`--' /
1932 \ / \/ /
1933 \ / /\ /
1934 `---X--' `------'</code></pre>
1935 </div></div>
1936 <div class="paragraph"><p>Here, the merge commits <code>O</code> and <code>P</code> contribute extra noise, as they did
1937 not actually contribute a change to <code>file.txt</code>. They only merged a topic
1938 that was based on an older version of <code>file.txt</code>. This is a common
1939 issue in repositories using a workflow where many contributors work in
1940 parallel and merge their topic branches along a single trunk: many
1941 unrelated merges appear in the <code>--full-history</code> results.</p></div>
1942 <div class="paragraph"><p>When using the <code>--simplify-merges</code> option, the commits <code>O</code> and <code>P</code>
1943 disappear from the results. This is because the rewritten second parents
1944 of <code>O</code> and <code>P</code> are reachable from their first parents. Those edges are
1945 removed and then the commits look like single-parent commits that are
1946 TREESAME to their parent. This also happens to the commit <code>N</code>, resulting
1947 in a history view as follows:</p></div>
1948 <div class="listingblock">
1949 <div class="content">
1950 <pre><code> .-A---M--.
1951 / / \
1952 I B R
1953 \ / /
1954 \ / /
1955 `---X--'</code></pre>
1956 </div></div>
1957 <div class="paragraph"><p>In this view, we see all of the important single-parent changes from
1958 <code>A</code>, <code>B</code>, and <code>X</code>. We also see the carefully-resolved merge <code>M</code> and the
1959 not-so-carefully-resolved merge <code>R</code>. This is usually enough information
1960 to determine why the commits <code>A</code> and <code>B</code> "disappeared" from history in
1961 the default view. However, there are a few issues with this approach.</p></div>
1962 <div class="paragraph"><p>The first issue is performance. Unlike any previous option, the
1963 <code>--simplify-merges</code> option requires walking the entire commit history
1964 before returning a single result. This can make the option difficult to
1965 use for very large repositories.</p></div>
1966 <div class="paragraph"><p>The second issue is one of auditing. When many contributors are working
1967 on the same repository, it is important which merge commits introduced
1968 a change into an important branch. The problematic merge <code>R</code> above is
1969 not likely to be the merge commit that was used to merge into an
1970 important branch. Instead, the merge <code>N</code> was used to merge <code>R</code> and <code>X</code>
1971 into the important branch. This commit may have information about why
1972 the change <code>X</code> came to override the changes from <code>A</code> and <code>B</code> in its
1973 commit message.</p></div>
1974 <div class="dlist"><dl>
1975 <dt class="hdlist1">
1976 --show-pulls
1977 </dt>
1978 <dd>
1980 In addition to the commits shown in the default history, show
1981 each merge commit that is not TREESAME to its first parent but
1982 is TREESAME to a later parent.
1983 </p>
1984 <div class="paragraph"><p>When a merge commit is included by <code>--show-pulls</code>, the merge is
1985 treated as if it "pulled" the change from another branch. When using
1986 <code>--show-pulls</code> on this example (and no other options) the resulting
1987 graph is:</p></div>
1988 <div class="listingblock">
1989 <div class="content">
1990 <pre><code> I---X---R---N</code></pre>
1991 </div></div>
1992 <div class="paragraph"><p>Here, the merge commits <code>R</code> and <code>N</code> are included because they pulled
1993 the commits <code>X</code> and <code>R</code> into the base branch, respectively. These
1994 merges are the reason the commits <code>A</code> and <code>B</code> do not appear in the
1995 default history.</p></div>
1996 <div class="paragraph"><p>When <code>--show-pulls</code> is paired with <code>--simplify-merges</code>, the
1997 graph includes all of the necessary information:</p></div>
1998 <div class="listingblock">
1999 <div class="content">
2000 <pre><code> .-A---M--. N
2001 / / \ /
2002 I B R
2003 \ / /
2004 \ / /
2005 `---X--'</code></pre>
2006 </div></div>
2007 <div class="paragraph"><p>Notice that since <code>M</code> is reachable from <code>R</code>, the edge from <code>N</code> to <code>M</code>
2008 was simplified away. However, <code>N</code> still appears in the history as an
2009 important commit because it "pulled" the change <code>R</code> into the main
2010 branch.</p></div>
2011 </dd>
2012 </dl></div>
2013 <div class="paragraph"><p>The <code>--simplify-by-decoration</code> option allows you to view only the
2014 big picture of the topology of the history, by omitting commits
2015 that are not referenced by tags. Commits are marked as !TREESAME
2016 (in other words, kept after history simplification rules described
2017 above) if (1) they are referenced by tags, or (2) they change the
2018 contents of the paths given on the command line. All other
2019 commits are marked as TREESAME (subject to be simplified away).</p></div>
2020 </div>
2021 </div>
2022 </div>
2023 <div class="sect1">
2024 <h2 id="_mapping_authors">MAPPING AUTHORS</h2>
2025 <div class="sectionbody">
2026 <div class="paragraph"><p>See <a href="gitmailmap.html">gitmailmap(5)</a>.</p></div>
2027 <div class="paragraph"><p>Note that if <code>git shortlog</code> is run outside of a repository (to process
2028 log contents on standard input), it will look for a <code>.mailmap</code> file in
2029 the current directory.</p></div>
2030 </div>
2031 </div>
2032 <div class="sect1">
2033 <h2 id="_git">GIT</h2>
2034 <div class="sectionbody">
2035 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
2036 </div>
2037 </div>
2038 </div>
2039 <div id="footnotes"><hr /></div>
2040 <div id="footer">
2041 <div id="footer-text">
2042 Last updated
2043 2022-11-04 21:49:36 PDT
2044 </div>
2045 </div>
2046 </body>
2047 </html>