blob: af1cfb15c10a33becc2dc98cfd316042b30a458e [file] [log] [blame]
Junio C Hamanob96f40a2024-08-01 00:57:251<!DOCTYPE html>
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3<head>
4<meta charset="UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
6<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7<meta name="generator" content="Asciidoctor 2.0.20"/>
8<title>git-rev-list(1)</title>
9<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
10<style>
11/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
12/* Uncomment the following line when using as a custom stylesheet */
13/* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
14html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15a{background:none}
16a:focus{outline:thin dotted}
17a:active,a:hover{outline:0}
18h1{font-size:2em;margin:.67em 0}
19b,strong{font-weight:bold}
20abbr{font-size:.9em}
21abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22dfn{font-style:italic}
23hr{height:0}
24mark{background:#ff0;color:#000}
25code,kbd,pre,samp{font-family:monospace;font-size:1em}
26pre{white-space:pre-wrap}
27q{quotes:"\201C" "\201D" "\2018" "\2019"}
28small{font-size:80%}
29sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30sup{top:-.5em}
31sub{bottom:-.25em}
32img{border:0}
33svg:not(:root){overflow:hidden}
34figure{margin:0}
35audio,video{display:inline-block}
36audio:not([controls]){display:none;height:0}
37fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38legend{border:0;padding:0}
39button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40button,input{line-height:normal}
41button,select{text-transform:none}
42button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43button[disabled],html input[disabled]{cursor:default}
44input[type=checkbox],input[type=radio]{padding:0}
45button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46textarea{overflow:auto;vertical-align:top}
47table{border-collapse:collapse;border-spacing:0}
48*,::before,::after{box-sizing:border-box}
49html,body{font-size:100%}
50body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
51a:hover{cursor:pointer}
52img,object,embed{max-width:100%;height:auto}
53object,embed{height:100%}
54img{-ms-interpolation-mode:bicubic}
55.left{float:left!important}
56.right{float:right!important}
57.text-left{text-align:left!important}
58.text-right{text-align:right!important}
59.text-center{text-align:center!important}
60.text-justify{text-align:justify!important}
61.hide{display:none}
62img,object,svg{display:inline-block;vertical-align:middle}
63textarea{height:auto;min-height:50px}
64select{width:100%}
65.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
66div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
67a{color:#2156a5;text-decoration:underline;line-height:inherit}
68a:hover,a:focus{color:#1d4b8f}
69a img{border:0}
70p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71p aside{font-size:.875em;line-height:1.35;font-style:italic}
72h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
73h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
74h1{font-size:2.125em}
75h2{font-size:1.6875em}
76h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77h4,h5{font-size:1.125em}
78h6{font-size:1em}
79hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80em,i{font-style:italic;line-height:inherit}
81strong,b{font-weight:bold;line-height:inherit}
82small{font-size:60%;line-height:inherit}
83code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85ul,ol{margin-left:1.5em}
86ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87ul.circle{list-style-type:circle}
88ul.disc{list-style-type:disc}
89ul.square{list-style-type:square}
90ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92dl dt{margin-bottom:.3125em;font-weight:bold}
93dl dd{margin-bottom:1.25em}
94blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
96@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
97h1{font-size:2.75em}
98h2{font-size:2.3125em}
99h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100h4{font-size:1.4375em}}
101table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102table thead,table tfoot{background:#f7f8f7}
103table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
104table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105table tr.even,table tr.alt{background:#f8f8f7}
106table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
109.center{margin-left:auto;margin-right:auto}
110.stretch{width:100%}
111.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
112.clearfix::after,.float-group::after{clear:both}
113:not(pre).nobreak{word-wrap:normal}
114:not(pre).nowrap{white-space:nowrap}
115:not(pre).pre-wrap{white-space:pre-wrap}
116:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
117pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119pre>code{display:block}
120pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121em em{font-style:normal}
122strong strong{font-weight:400}
123.keyseq{color:rgba(51,51,51,.8)}
124kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
125.keyseq kbd:first-child{margin-left:0}
126.keyseq kbd:last-child{margin-right:0}
127.menuseq,.menuref{color:#000}
128.menuseq b:not(.caret),.menuref{font-weight:inherit}
129.menuseq{word-spacing:-.02em}
130.menuseq b.caret{font-size:1.25em;line-height:.8}
131.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
132b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133b.button::before{content:"[";padding:0 3px 0 2px}
134b.button::after{content:"]";padding:0 2px 0 3px}
135p a>code:hover{color:rgba(0,0,0,.9)}
136#header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
137#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
138#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
139#content{margin-top:1.25em}
140#content::before{content:none}
141#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
142#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
143#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
144#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
145#header .details span:first-child{margin-left:-.125em}
146#header .details span.email a{color:rgba(0,0,0,.85)}
147#header .details br{display:none}
148#header .details br+span::before{content:"\00a0\2013\00a0"}
149#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
150#header .details br+span#revremark::before{content:"\00a0|\00a0"}
151#header #revnumber{text-transform:capitalize}
152#header #revnumber::after{content:"\00a0"}
153#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
154#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
155#toc>ul{margin-left:.125em}
156#toc ul.sectlevel0>li>a{font-style:italic}
157#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
158#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
159#toc li{line-height:1.3334;margin-top:.3334em}
160#toc a{text-decoration:none}
161#toc a:active{text-decoration:underline}
162#toctitle{color:#7a2518;font-size:1.2em}
163@media screen and (min-width:768px){#toctitle{font-size:1.375em}
164body.toc2{padding-left:15em;padding-right:0}
165#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
166#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
167#toc.toc2>ul{font-size:.9em;margin-bottom:0}
168#toc.toc2 ul ul{margin-left:0;padding-left:1em}
169#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
170body.toc2.toc-right{padding-left:0;padding-right:15em}
171body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
172@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
173#toc.toc2{width:20em}
174#toc.toc2 #toctitle{font-size:1.375em}
175#toc.toc2>ul{font-size:.95em}
176#toc.toc2 ul ul{padding-left:1.25em}
177body.toc2.toc-right{padding-left:0;padding-right:20em}}
178#content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
179#content #toc>:first-child{margin-top:0}
180#content #toc>:last-child{margin-bottom:0}
181#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
182#footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
183#content{margin-bottom:.625em}
184.sect1{padding-bottom:.625em}
185@media screen and (min-width:768px){#content{margin-bottom:1.25em}
186.sect1{padding-bottom:1.25em}}
187.sect1:last-child{padding-bottom:0}
188.sect1+.sect1{border-top:1px solid #e7e7e9}
189#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
190#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
191#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
192#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
193#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
194details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
195details{margin-left:1.25rem}
196details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197details>summary::-webkit-details-marker{display:none}
198details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
199details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
200details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
201.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
202table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
203.paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
204.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
205.admonitionblock>table td.icon{text-align:center;width:80px}
206.admonitionblock>table td.icon img{max-width:none}
207.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
208.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
209.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
210.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
211.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
212.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
213.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
214.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
215.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
216@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
217@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
218.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
219.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
220.listingblock>.content{position:relative}
221.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
222.listingblock:hover code[data-lang]::before{display:block}
223.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
224.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
225.listingblock pre.highlightjs{padding:0}
226.listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
227.listingblock pre.prettyprint{border-width:0}
228.prettyprint{background:#f7f7f8}
229pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
230pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
231pre.prettyprint li code[data-lang]::before{opacity:1}
232pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
234table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
235table.linenotable td.code{padding-left:.75em}
236table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
237pre.pygments span.linenos{display:inline-block;margin-right:.75em}
238.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
239.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
240.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
241.quoteblock blockquote{margin:0;padding:0;border:0}
242.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
243.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
244.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
245.verseblock{margin:0 1em 1.25em}
246.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
247.verseblock pre strong{font-weight:400}
248.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
249.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
250.quoteblock .attribution br,.verseblock .attribution br{display:none}
251.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
252.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
253.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
254.quoteblock.abstract{margin:0 1em 1.25em;display:block}
255.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
256.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
257.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
258.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
259.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
260p.tableblock:last-child{margin-bottom:0}
261td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
262td.tableblock>.content>:last-child{margin-bottom:-1.25em}
263table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
264table.grid-all>*>tr>*{border-width:1px}
265table.grid-cols>*>tr>*{border-width:0 1px}
266table.grid-rows>*>tr>*{border-width:1px 0}
267table.frame-all{border-width:1px}
268table.frame-ends{border-width:1px 0}
269table.frame-sides{border-width:0 1px}
270table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
271table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
272table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
273table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
274table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
275th.halign-left,td.halign-left{text-align:left}
276th.halign-right,td.halign-right{text-align:right}
277th.halign-center,td.halign-center{text-align:center}
278th.valign-top,td.valign-top{vertical-align:top}
279th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280th.valign-middle,td.valign-middle{vertical-align:middle}
281table thead th,table tfoot th{font-weight:bold}
282tbody tr th{background:#f7f8f7}
283tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
284p.tableblock>code:only-child{background:none;padding:0}
285p.tableblock{font-size:1em}
286ol{margin-left:1.75em}
287ul li ol{margin-left:1.5em}
288dl dd{margin-left:1.125em}
289dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
290li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
291ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
293ul.unstyled,ol.unstyled{margin-left:0}
294li>p:empty:only-child::before{content:"";display:inline-block}
295ul.checklist>li>p:first-child{margin-left:-1em}
296ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
297ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
298ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
299ul.inline>li{margin-left:1.25em}
300.unstyled dl dt{font-weight:400;font-style:normal}
301ol.arabic{list-style-type:decimal}
302ol.decimal{list-style-type:decimal-leading-zero}
303ol.loweralpha{list-style-type:lower-alpha}
304ol.upperalpha{list-style-type:upper-alpha}
305ol.lowerroman{list-style-type:lower-roman}
306ol.upperroman{list-style-type:upper-roman}
307ol.lowergreek{list-style-type:lower-greek}
308.hdlist>table,.colist>table{border:0;background:none}
309.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
310td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
311td.hdlist1{font-weight:bold;padding-bottom:1.25em}
312td.hdlist2{word-wrap:anywhere}
313.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
314.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
315.colist td:not([class]):first-child img{max-width:none}
316.colist td:not([class]):last-child{padding:.25em 0}
317.thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
318.imageblock.left{margin:.25em .625em 1.25em 0}
319.imageblock.right{margin:.25em 0 1.25em .625em}
320.imageblock>.title{margin-bottom:0}
321.imageblock.thumb,.imageblock.th{border-width:6px}
322.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
323.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
324.image.left{margin-right:.625em}
325.image.right{margin-left:.625em}
326a.image{text-decoration:none;display:inline-block}
327a.image object{pointer-events:none}
328sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
329sup.footnote a,sup.footnoteref a{text-decoration:none}
330sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
331#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
332#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
333#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
334#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
335#footnotes .footnote:last-of-type{margin-bottom:0}
336#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
337div.unbreakable{page-break-inside:avoid}
338.big{font-size:larger}
339.small{font-size:smaller}
340.underline{text-decoration:underline}
341.overline{text-decoration:overline}
342.line-through{text-decoration:line-through}
343.aqua{color:#00bfbf}
344.aqua-background{background:#00fafa}
345.black{color:#000}
346.black-background{background:#000}
347.blue{color:#0000bf}
348.blue-background{background:#0000fa}
349.fuchsia{color:#bf00bf}
350.fuchsia-background{background:#fa00fa}
351.gray{color:#606060}
352.gray-background{background:#7d7d7d}
353.green{color:#006000}
354.green-background{background:#007d00}
355.lime{color:#00bf00}
356.lime-background{background:#00fa00}
357.maroon{color:#600000}
358.maroon-background{background:#7d0000}
359.navy{color:#000060}
360.navy-background{background:#00007d}
361.olive{color:#606000}
362.olive-background{background:#7d7d00}
363.purple{color:#600060}
364.purple-background{background:#7d007d}
365.red{color:#bf0000}
366.red-background{background:#fa0000}
367.silver{color:#909090}
368.silver-background{background:#bcbcbc}
369.teal{color:#006060}
370.teal-background{background:#007d7d}
371.white{color:#bfbfbf}
372.white-background{background:#fafafa}
373.yellow{color:#bfbf00}
374.yellow-background{background:#fafa00}
375span.icon>.fa{cursor:default}
376a span.icon>.fa{cursor:inherit}
377.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
378.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
379.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
380.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
381.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
382.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
383.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
384.conum[data-value] *{color:#fff!important}
385.conum[data-value]+b{display:none}
386.conum[data-value]::after{content:attr(data-value)}
387pre .conum[data-value]{position:relative;top:-.125em}
388b.conum *{color:inherit!important}
389.conum:not([data-value]):empty{display:none}
390dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
392p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
393p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
394p{margin-bottom:1.25rem}
395.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
396.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
397.print-only{display:none!important}
398@page{margin:1.25cm .75cm}
399@media print{*{box-shadow:none!important;text-shadow:none!important}
400html{font-size:80%}
401a{color:inherit!important;text-decoration:underline!important}
402a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
403a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
404abbr[title]{border-bottom:1px dotted}
405abbr[title]::after{content:" (" attr(title) ")"}
406pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407thead{display:table-header-group}
408svg{max-width:100%}
409p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
410h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
411#header,#content,#footnotes,#footer{max-width:none}
412#toc,.sidebarblock,.exampleblock>.content{background:none!important}
413#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
414body.book #header{text-align:center}
415body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
416body.book #header .details{border:0!important;display:block;padding:0!important}
417body.book #header .details span:first-child{margin-left:0!important}
418body.book #header .details br{display:block}
419body.book #header .details br+span::before{content:none!important}
420body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
421body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
422.listingblock code[data-lang]::before{display:block}
423#footer{padding:0 .9375em}
424.hide-on-print{display:none!important}
425.print-only{display:block!important}
426.hide-for-print{display:none!important}
427.show-for-print{display:inherit!important}}
428@media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
429.sect1{padding:0!important}
430.sect1+.sect1{border:0}
431#footer{background:none}
432#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
433@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
434</style>
435<style>
436pre>code {
437 display: inline;
438}
439</style>
440</head>
441<body class="manpage">
442<div id="header">
443<h1>git-rev-list(1) Manual Page</h1>
444<h2 id="_name">NAME</h2>
445<div class="sectionbody">
446<p>git-rev-list - Lists commit objects in reverse chronological order</p>
447</div>
448</div>
449<div id="content">
450<div class="sect1">
451<h2 id="_synopsis">SYNOPSIS</h2>
452<div class="sectionbody">
453<div class="verseblock">
454<pre class="content"><em>git rev-list</em> [&lt;options&gt;] &lt;commit&gt;&#8230;&#8203; [--] [&lt;path&gt;&#8230;&#8203;]</pre>
455</div>
456</div>
457</div>
458<div class="sect1">
459<h2 id="_description">DESCRIPTION</h2>
460<div class="sectionbody">
461<div class="paragraph">
462<p>List commits that are reachable by following the <code>parent</code> links from the
463given commit(s), but exclude commits that are reachable from the one(s)
464given with a <em>^</em> in front of them. The output is given in reverse
465chronological order by default.</p>
466</div>
467<div class="paragraph">
468<p>You can think of this as a set operation. Commits reachable from any of
469the commits given on the command line form a set, and then commits reachable
470from any of the ones given with <em>^</em> in front are subtracted from that
471set. The remaining commits are what comes out in the command&#8217;s output.
472Various other options and paths parameters can be used to further limit the
473result.</p>
474</div>
475<div class="paragraph">
476<p>Thus, the following command:</p>
477</div>
478<div class="listingblock">
479<div class="content">
480<pre>$ git rev-list foo bar ^baz</pre>
481</div>
482</div>
483<div class="paragraph">
484<p>means "list all the commits which are reachable from <em>foo</em> or <em>bar</em>, but
485not from <em>baz</em>".</p>
486</div>
487<div class="paragraph">
488<p>A special notation "<em>&lt;commit1&gt;</em>..<em>&lt;commit2&gt;</em>" can be used as a
489short-hand for "^<em>&lt;commit1&gt;</em> <em>&lt;commit2&gt;</em>". For example, either of
490the following may be used interchangeably:</p>
491</div>
492<div class="listingblock">
493<div class="content">
494<pre>$ git rev-list origin..HEAD
495$ git rev-list HEAD ^origin</pre>
496</div>
497</div>
498<div class="paragraph">
499<p>Another special notation is "<em>&lt;commit1&gt;</em>&#8230;&#8203;<em>&lt;commit2&gt;</em>" which is useful
500for merges. The resulting set of commits is the symmetric difference
501between the two operands. The following two commands are equivalent:</p>
502</div>
503<div class="listingblock">
504<div class="content">
505<pre>$ git rev-list A B --not $(git merge-base --all A B)
506$ git rev-list A...B</pre>
507</div>
508</div>
509<div class="paragraph">
510<p><em>rev-list</em> is an essential Git command, since it
511provides the ability to build and traverse commit ancestry graphs. For
512this reason, it has a lot of different options that enable it to be
513used by commands as different as <em>git bisect</em> and
514<em>git repack</em>.</p>
515</div>
516</div>
517</div>
518<div class="sect1">
519<h2 id="_options">OPTIONS</h2>
520<div class="sectionbody">
521<div class="sect2">
522<h3 id="_commit_limiting">Commit Limiting</h3>
523<div class="paragraph">
524<p>Besides specifying a range of commits that should be listed using the
525special notations explained in the description, additional commit
526limiting may be applied.</p>
527</div>
528<div class="paragraph">
529<p>Using more options generally further limits the output (e.g.
530<code>--since=&lt;date1&gt;</code> limits to commits newer than <code>&lt;date1&gt;</code>, and using it
531with <code>--grep=&lt;pattern&gt;</code> further limits to commits whose log message
532has a line that matches <code>&lt;pattern&gt;</code>), unless otherwise noted.</p>
533</div>
534<div class="paragraph">
535<p>Note that these are applied before commit
536ordering and formatting options, such as <code>--reverse</code>.</p>
537</div>
538<div class="dlist">
539<dl>
540<dt class="hdlist1">-&lt;number&gt;</dt>
541<dt class="hdlist1">-n &lt;number&gt;</dt>
542<dt class="hdlist1">--max-count=&lt;number&gt;</dt>
543<dd>
544<p>Limit the number of commits to output.</p>
545</dd>
546<dt class="hdlist1">--skip=&lt;number&gt;</dt>
547<dd>
548<p>Skip <em>number</em> commits before starting to show the commit output.</p>
549</dd>
550<dt class="hdlist1">--since=&lt;date&gt;</dt>
551<dt class="hdlist1">--after=&lt;date&gt;</dt>
552<dd>
553<p>Show commits more recent than a specific date.</p>
554</dd>
555<dt class="hdlist1">--since-as-filter=&lt;date&gt;</dt>
556<dd>
557<p>Show all commits more recent than a specific date. This visits
558all commits in the range, rather than stopping at the first commit which
559is older than a specific date.</p>
560</dd>
561<dt class="hdlist1">--until=&lt;date&gt;</dt>
562<dt class="hdlist1">--before=&lt;date&gt;</dt>
563<dd>
564<p>Show commits older than a specific date.</p>
565</dd>
566<dt class="hdlist1">--max-age=&lt;timestamp&gt;</dt>
567<dt class="hdlist1">--min-age=&lt;timestamp&gt;</dt>
568<dd>
569<p>Limit the commits output to specified time range.</p>
570</dd>
571<dt class="hdlist1">--author=&lt;pattern&gt;</dt>
572<dt class="hdlist1">--committer=&lt;pattern&gt;</dt>
573<dd>
574<p>Limit the commits output to ones with author/committer
575header lines that match the specified pattern (regular
576expression). With more than one <code>--author=&lt;pattern&gt;</code>,
577commits whose author matches any of the given patterns are
578chosen (similarly for multiple <code>--committer=&lt;pattern&gt;</code>).</p>
579</dd>
580<dt class="hdlist1">--grep-reflog=&lt;pattern&gt;</dt>
581<dd>
582<p>Limit the commits output to ones with reflog entries that
583match the specified pattern (regular expression). With
584more than one <code>--grep-reflog</code>, commits whose reflog message
585matches any of the given patterns are chosen. It is an
586error to use this option unless <code>--walk-reflogs</code> is in use.</p>
587</dd>
588<dt class="hdlist1">--grep=&lt;pattern&gt;</dt>
589<dd>
590<p>Limit the commits output to ones with a log message that
591matches the specified pattern (regular expression). With
592more than one <code>--grep=&lt;pattern&gt;</code>, commits whose message
593matches any of the given patterns are chosen (but see
594<code>--all-match</code>).</p>
595</dd>
596<dt class="hdlist1">--all-match</dt>
597<dd>
598<p>Limit the commits output to ones that match all given <code>--grep</code>,
599instead of ones that match at least one.</p>
600</dd>
601<dt class="hdlist1">--invert-grep</dt>
602<dd>
603<p>Limit the commits output to ones with a log message that do not
604match the pattern specified with <code>--grep=&lt;pattern&gt;</code>.</p>
605</dd>
606<dt class="hdlist1">-i</dt>
607<dt class="hdlist1">--regexp-ignore-case</dt>
608<dd>
609<p>Match the regular expression limiting patterns without regard to letter
610case.</p>
611</dd>
612<dt class="hdlist1">--basic-regexp</dt>
613<dd>
614<p>Consider the limiting patterns to be basic regular expressions;
615this is the default.</p>
616</dd>
617<dt class="hdlist1">-E</dt>
618<dt class="hdlist1">--extended-regexp</dt>
619<dd>
620<p>Consider the limiting patterns to be extended regular expressions
621instead of the default basic regular expressions.</p>
622</dd>
623<dt class="hdlist1">-F</dt>
624<dt class="hdlist1">--fixed-strings</dt>
625<dd>
626<p>Consider the limiting patterns to be fixed strings (don&#8217;t interpret
627pattern as a regular expression).</p>
628</dd>
629<dt class="hdlist1">-P</dt>
630<dt class="hdlist1">--perl-regexp</dt>
631<dd>
632<p>Consider the limiting patterns to be Perl-compatible regular
633expressions.</p>
634<div class="paragraph">
635<p>Support for these types of regular expressions is an optional
636compile-time dependency. If Git wasn&#8217;t compiled with support for them
637providing this option will cause it to die.</p>
638</div>
639</dd>
640<dt class="hdlist1">--remove-empty</dt>
641<dd>
642<p>Stop when a given path disappears from the tree.</p>
643</dd>
644<dt class="hdlist1">--merges</dt>
645<dd>
646<p>Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.</p>
647</dd>
648<dt class="hdlist1">--no-merges</dt>
649<dd>
650<p>Do not print commits with more than one parent. This is
651exactly the same as <code>--max-parents=1</code>.</p>
652</dd>
653<dt class="hdlist1">--min-parents=&lt;number&gt;</dt>
654<dt class="hdlist1">--max-parents=&lt;number&gt;</dt>
655<dt class="hdlist1">--no-min-parents</dt>
656<dt class="hdlist1">--no-max-parents</dt>
657<dd>
658<p>Show only commits which have at least (or at most) that many parent
659commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
660<code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
661gives all root commits and <code>--min-parents=3</code> all octopus merges.</p>
662<div class="paragraph">
663<p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
664again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
665parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p>
666</div>
667</dd>
668<dt class="hdlist1">--first-parent</dt>
669<dd>
670<p>When finding commits to include, follow only the first
671parent commit upon seeing a merge commit. This option
672can give a better overview when viewing the evolution of
673a particular topic branch, because merges into a topic
674branch tend to be only about adjusting to updated upstream
675from time to time, and this option allows you to ignore
676the individual commits brought in to your history by such
677a merge.</p>
678</dd>
679<dt class="hdlist1">--exclude-first-parent-only</dt>
680<dd>
681<p>When finding commits to exclude (with a <em>^</em>), follow only
682the first parent commit upon seeing a merge commit.
683This can be used to find the set of changes in a topic branch
684from the point where it diverged from the remote branch, given
685that arbitrary merges can be valid topic branch changes.</p>
686</dd>
687<dt class="hdlist1">--not</dt>
688<dd>
689<p>Reverses the meaning of the <em>^</em> prefix (or lack thereof)
690for all following revision specifiers, up to the next <code>--not</code>.
691When used on the command line before --stdin, the revisions passed
692through stdin will not be affected by it. Conversely, when passed
693via standard input, the revisions passed on the command line will
694not be affected by it.</p>
695</dd>
696<dt class="hdlist1">--all</dt>
697<dd>
698<p>Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
699listed on the command line as <em>&lt;commit&gt;</em>.</p>
700</dd>
701<dt class="hdlist1">--branches[=&lt;pattern&gt;]</dt>
702<dd>
703<p>Pretend as if all the refs in <code>refs/heads</code> are listed
704on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
705branches to ones matching given shell glob. If pattern lacks <em>?</em>,
706<em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied.</p>
707</dd>
708<dt class="hdlist1">--tags[=&lt;pattern&gt;]</dt>
709<dd>
710<p>Pretend as if all the refs in <code>refs/tags</code> are listed
711on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
712tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>*</em>,
713or <em>[</em>, <em>/*</em> at the end is implied.</p>
714</dd>
715<dt class="hdlist1">--remotes[=&lt;pattern&gt;]</dt>
716<dd>
717<p>Pretend as if all the refs in <code>refs/remotes</code> are listed
718on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
719remote-tracking branches to ones matching given shell glob.
720If pattern lacks <em>?</em>, <em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied.</p>
721</dd>
722<dt class="hdlist1">--glob=&lt;glob-pattern&gt;</dt>
723<dd>
724<p>Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
725are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
726is automatically prepended if missing. If pattern lacks <em>?</em>, <em>*</em>,
727or <em>[</em>, <em>/*</em> at the end is implied.</p>
728</dd>
729<dt class="hdlist1">--exclude=&lt;glob-pattern&gt;</dt>
730<dd>
731<p>Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
732<code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
733consider. Repetitions of this option accumulate exclusion patterns
734up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
735<code>--glob</code> option (other options or arguments do not clear
736accumulated patterns).</p>
737<div class="paragraph">
738<p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
739<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
740respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
741or <code>--all</code>. If a trailing <em>/*</em> is intended, it must be given
742explicitly.</p>
743</div>
744</dd>
745<dt class="hdlist1">--exclude-hidden=[fetch|receive|uploadpack]</dt>
746<dd>
747<p>Do not include refs that would be hidden by <code>git-fetch</code>,
748<code>git-receive-pack</code> or <code>git-upload-pack</code> by consulting the appropriate
749<code>fetch.hideRefs</code>, <code>receive.hideRefs</code> or <code>uploadpack.hideRefs</code>
750configuration along with <code>transfer.hideRefs</code> (see
751<a href="git-config.html">git-config(1)</a>). This option affects the next pseudo-ref option
752<code>--all</code> or <code>--glob</code> and is cleared after processing them.</p>
753</dd>
754<dt class="hdlist1">--reflog</dt>
755<dd>
756<p>Pretend as if all objects mentioned by reflogs are listed on the
757command line as <code>&lt;commit&gt;</code>.</p>
758</dd>
759<dt class="hdlist1">--alternate-refs</dt>
760<dd>
761<p>Pretend as if all objects mentioned as ref tips of alternate
762repositories were listed on the command line. An alternate
763repository is any repository whose object directory is specified
764in <code>objects/info/alternates</code>. The set of included objects may
765be modified by <code>core.alternateRefsCommand</code>, etc. See
766<a href="git-config.html">git-config(1)</a>.</p>
767</dd>
768<dt class="hdlist1">--single-worktree</dt>
769<dd>
770<p>By default, all working trees will be examined by the
771following options when there are more than one (see
772<a href="git-worktree.html">git-worktree(1)</a>): <code>--all</code>, <code>--reflog</code> and
773<code>--indexed-objects</code>.
774This option forces them to examine the current working tree
775only.</p>
776</dd>
777<dt class="hdlist1">--ignore-missing</dt>
778<dd>
779<p>Upon seeing an invalid object name in the input, pretend as if
780the bad input was not given.</p>
781</dd>
782<dt class="hdlist1">--stdin</dt>
783<dd>
784<p>In addition to getting arguments from the command line, read
785them from standard input as well. This accepts commits and
786pseudo-options like <code>--all</code> and <code>--glob=</code>. When a <code>--</code> separator
787is seen, the following input is treated as paths and used to
788limit the result. Flags like <code>--not</code> which are read via standard input
789are only respected for arguments passed in the same way and will not
790influence any subsequent command line arguments.</p>
791</dd>
792<dt class="hdlist1">--quiet</dt>
793<dd>
794<p>Don&#8217;t print anything to standard output. This form
795is primarily meant to allow the caller to
796test the exit status to see if a range of objects is fully
797connected (or not). It is faster than redirecting stdout
798to <code>/dev/null</code> as the output does not have to be formatted.</p>
799</dd>
800<dt class="hdlist1">--disk-usage</dt>
801<dt class="hdlist1">--disk-usage=human</dt>
802<dd>
803<p>Suppress normal output; instead, print the sum of the bytes used
804for on-disk storage by the selected commits or objects. This is
805equivalent to piping the output into <code>git cat-file
806--batch-check='%(objectsize:disk)'</code>, except that it runs much
807faster (especially with <code>--use-bitmap-index</code>). See the <code>CAVEATS</code>
808section in <a href="git-cat-file.html">git-cat-file(1)</a> for the limitations of what
809"on-disk storage" means.
810With the optional value <code>human</code>, on-disk storage size is shown
811in human-readable string(e.g. 12.24 Kib, 3.50 Mib).</p>
812</dd>
813<dt class="hdlist1">--cherry-mark</dt>
814<dd>
815<p>Like <code>--cherry-pick</code> (see below) but mark equivalent commits
816with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.</p>
817</dd>
818<dt class="hdlist1">--cherry-pick</dt>
819<dd>
820<p>Omit any commit that introduces the same change as
821another commit on the &#8220;other side&#8221; when the set of
822commits are limited with symmetric difference.</p>
823<div class="paragraph">
824<p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way
825to list all commits on only one side of them is with
826<code>--left-right</code> (see the example below in the description of
827the <code>--left-right</code> option). However, it shows the commits that were
828cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
829cherry-picked from branch A). With this option, such pairs of commits are
830excluded from the output.</p>
831</div>
832</dd>
833<dt class="hdlist1">--left-only</dt>
834<dt class="hdlist1">--right-only</dt>
835<dd>
836<p>List only commits on the respective side of a symmetric difference,
837i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
838<code>--left-right</code>.</p>
839<div class="paragraph">
840<p>For example, <code>--cherry-pick --right-only A...B</code> omits those
841commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
842<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
843More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
844list.</p>
845</div>
846</dd>
847<dt class="hdlist1">--cherry</dt>
848<dd>
849<p>A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
850limit the output to the commits on our side and mark those that
851have been applied to the other side of a forked history with
852<code>git log --cherry upstream...mybranch</code>, similar to
853<code>git cherry upstream mybranch</code>.</p>
854</dd>
855<dt class="hdlist1">-g</dt>
856<dt class="hdlist1">--walk-reflogs</dt>
857<dd>
858<p>Instead of walking the commit ancestry chain, walk
859reflog entries from the most recent one to older ones.
860When this option is used you cannot specify commits to
861exclude (that is, <em>^commit</em>, <em>commit1..commit2</em>,
862and <em>commit1...commit2</em> notations cannot be used).</p>
863<div class="paragraph">
864<p>With <code>--pretty</code> format other than <code>oneline</code> and <code>reference</code> (for obvious reasons),
865this causes the output to have two extra lines of information
866taken from the reflog. The reflog designator in the output may be shown
867as <code>ref@{&lt;Nth&gt;}</code> (where <em>&lt;Nth&gt;</em> is the reverse-chronological index in the
868reflog) or as <code>ref@{&lt;timestamp&gt;}</code> (with the <em>&lt;timestamp&gt;</em> for that entry),
869depending on a few rules:</p>
870</div>
871<div class="openblock">
872<div class="content">
873<div class="olist arabic">
874<ol class="arabic">
875<li>
876<p>If the starting point is specified as <code>ref@{&lt;Nth&gt;}</code>, show the index
877format.</p>
878</li>
879<li>
880<p>If the starting point was specified as <code>ref@{now}</code>, show the
881timestamp format.</p>
882</li>
883<li>
884<p>If neither was used, but <code>--date</code> was given on the command line, show
885the timestamp in the format requested by <code>--date</code>.</p>
886</li>
887<li>
888<p>Otherwise, show the index format.</p>
889</li>
890</ol>
891</div>
892</div>
893</div>
894<div class="paragraph">
895<p>Under <code>--pretty=oneline</code>, the commit message is
896prefixed with this information on the same line.
897This option cannot be combined with <code>--reverse</code>.
898See also <a href="git-reflog.html">git-reflog(1)</a>.</p>
899</div>
900<div class="paragraph">
901<p>Under <code>--pretty=reference</code>, this information will not be shown at all.</p>
902</div>
903</dd>
904<dt class="hdlist1">--merge</dt>
905<dd>
906<p>Show commits touching conflicted paths in the range <code>HEAD...&lt;other&gt;</code>,
907where <code>&lt;other&gt;</code> is the first existing pseudoref in <code>MERGE_HEAD</code>,
908<code>CHERRY_PICK_HEAD</code>, <code>REVERT_HEAD</code> or <code>REBASE_HEAD</code>. Only works
909when the index has unmerged entries. This option can be used to show
910relevant commits when resolving conflicts from a 3-way merge.</p>
911</dd>
912<dt class="hdlist1">--boundary</dt>
913<dd>
914<p>Output excluded boundary commits. Boundary commits are
915prefixed with <code>-</code>.</p>
916</dd>
917<dt class="hdlist1">--use-bitmap-index</dt>
918<dd>
919<p>Try to speed up the traversal using the pack bitmap index (if
920one is available). Note that when traversing with <code>--objects</code>,
921trees and blobs will not have their associated path printed.</p>
922</dd>
923<dt class="hdlist1">--progress=&lt;header&gt;</dt>
924<dd>
925<p>Show progress reports on stderr as objects are considered. The
926<code>&lt;header&gt;</code> text will be printed with each progress update.</p>
927</dd>
928</dl>
929</div>
930</div>
931<div class="sect2">
932<h3 id="_history_simplification">History Simplification</h3>
933<div class="paragraph">
934<p>Sometimes you are only interested in parts of the history, for example the
935commits modifying a particular &lt;path&gt;. But there are two parts of
936<em>History Simplification</em>, one part is selecting the commits and the other
937is how to do it, as there are various strategies to simplify the history.</p>
938</div>
939<div class="paragraph">
940<p>The following options select the commits to be shown:</p>
941</div>
942<div class="dlist">
943<dl>
944<dt class="hdlist1">&lt;paths&gt;</dt>
945<dd>
946<p>Commits modifying the given &lt;paths&gt; are selected.</p>
947</dd>
948<dt class="hdlist1">--simplify-by-decoration</dt>
949<dd>
950<p>Commits that are referred by some branch or tag are selected.</p>
951</dd>
952</dl>
953</div>
954<div class="paragraph">
955<p>Note that extra commits can be shown to give a meaningful history.</p>
956</div>
957<div class="paragraph">
958<p>The following options affect the way the simplification is performed:</p>
959</div>
960<div class="dlist">
961<dl>
962<dt class="hdlist1">Default mode</dt>
963<dd>
964<p>Simplifies the history to the simplest history explaining the
965final state of the tree. Simplest because it prunes some side
966branches if the end result is the same (i.e. merging branches
967with the same content)</p>
968</dd>
969<dt class="hdlist1">--show-pulls</dt>
970<dd>
971<p>Include all commits from the default mode, but also any merge
972commits that are not TREESAME to the first parent but are
973TREESAME to a later parent. This mode is helpful for showing
974the merge commits that "first introduced" a change to a branch.</p>
975</dd>
976<dt class="hdlist1">--full-history</dt>
977<dd>
978<p>Same as the default mode, but does not prune some history.</p>
979</dd>
980<dt class="hdlist1">--dense</dt>
981<dd>
982<p>Only the selected commits are shown, plus some to have a
983meaningful history.</p>
984</dd>
985<dt class="hdlist1">--sparse</dt>
986<dd>
987<p>All commits in the simplified history are shown.</p>
988</dd>
989<dt class="hdlist1">--simplify-merges</dt>
990<dd>
991<p>Additional option to <code>--full-history</code> to remove some needless
992merges from the resulting history, as there are no selected
993commits contributing to this merge.</p>
994</dd>
995<dt class="hdlist1">--ancestry-path[=&lt;commit&gt;]</dt>
996<dd>
997<p>When given a range of commits to display (e.g. <em>commit1..commit2</em>
998or <em>commit2 ^commit1</em>), only display commits in that range
999that are ancestors of &lt;commit&gt;, descendants of &lt;commit&gt;, or
1000&lt;commit&gt; itself. If no commit is specified, use <em>commit1</em> (the
1001excluded part of the range) as &lt;commit&gt;. Can be passed multiple
1002times; if so, a commit is included if it is any of the commits
1003given or if it is an ancestor or descendant of one of them.</p>
1004</dd>
1005</dl>
1006</div>
1007<div class="paragraph">
1008<p>A more detailed explanation follows.</p>
1009</div>
1010<div class="paragraph">
1011<p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1012that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1013filtered for <code>foo</code>, they look different and equal, respectively.)</p>
1014</div>
1015<div class="paragraph">
1016<p>In the following, we will always refer to the same example history to
1017illustrate the differences between simplification settings. We assume
1018that you are filtering for a file <code>foo</code> in this commit graph:</p>
1019</div>
1020<div class="listingblock">
1021<div class="content">
1022<pre> .-A---M---N---O---P---Q
1023 / / / / / /
1024 I B C D E Y
1025 \ / / / / /
1026 `-------------' X</pre>
1027</div>
1028</div>
1029<div class="paragraph">
1030<p>The horizontal line of history A---Q is taken to be the first parent of
1031each merge. The commits are:</p>
1032</div>
1033<div class="ulist">
1034<ul>
1035<li>
1036<p><code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1037&#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1038commits are compared to an empty tree, so <code>I</code> is !TREESAME.</p>
1039</li>
1040<li>
1041<p>In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.</p>
1042</li>
1043<li>
1044<p><code>B</code> contains the same change as <code>A</code>. Its merge <code>M</code> is trivial and
1045hence TREESAME to all parents.</p>
1046</li>
1047<li>
1048<p><code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to &#8220;foobar&#8221;,
1049so it is not TREESAME to any parent.</p>
1050</li>
1051<li>
1052<p><code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1053<code>N</code> and <code>D</code> to &#8220;foobarbaz&#8221;; i.e., it is not TREESAME to any parent.</p>
1054</li>
1055<li>
1056<p><code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1057strings to &#8220;quux xyzzy&#8221;. <code>P</code> is TREESAME to <code>O</code>, but not to <code>E</code>.</p>
1058</li>
1059<li>
1060<p><code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1061modified it. <code>Y</code> is TREESAME to <code>X</code>. Its merge <code>Q</code> added <code>side</code> to <code>P</code>, and
1062<code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.</p>
1063</li>
1064</ul>
1065</div>
1066<div class="paragraph">
1067<p><code>rev-list</code> walks backwards through history, including or excluding
1068commits based on whether <code>--full-history</code> and/or parent rewriting
1069(via <code>--parents</code> or <code>--children</code>) are used. The following settings
1070are available.</p>
1071</div>
1072<div class="dlist">
1073<dl>
1074<dt class="hdlist1">Default mode</dt>
1075<dd>
1076<p>Commits are included if they are not TREESAME to any parent
1077(though this can be changed, see <code>--sparse</code> below). If the
1078commit was a merge, and it was TREESAME to one parent, follow
1079only that parent. (Even if there are several TREESAME
1080parents, follow only one of them.) Otherwise, follow all
1081parents.</p>
1082<div class="paragraph">
1083<p>This results in:</p>
1084</div>
1085<div class="listingblock">
1086<div class="content">
1087<pre> .-A---N---O
1088 / / /
1089 I---------D</pre>
1090</div>
1091</div>
1092<div class="paragraph">
1093<p>Note how the rule to only follow the TREESAME parent, if one is
1094available, removed <code>B</code> from consideration entirely. <code>C</code> was
1095considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1096empty tree, so <code>I</code> is !TREESAME.</p>
1097</div>
1098<div class="paragraph">
1099<p>Parent/child relations are only visible with <code>--parents</code>, but that does
1100not affect the commits selected in default mode, so we have shown the
1101parent lines.</p>
1102</div>
1103</dd>
1104<dt class="hdlist1">--full-history without parent rewriting</dt>
1105<dd>
1106<p>This mode differs from the default in one point: always follow
1107all parents of a merge, even if it is TREESAME to one of them.
1108Even if more than one side of the merge has commits that are
1109included, this does not imply that the merge itself is! In
1110the example, we get</p>
1111<div class="listingblock">
1112<div class="content">
1113<pre> I A B N D O P Q</pre>
1114</div>
1115</div>
1116<div class="paragraph">
1117<p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1118<code>C</code> and <code>B</code> were all walked, but only <code>B</code> was !TREESAME, so the others
1119do not appear.</p>
1120</div>
1121<div class="paragraph">
1122<p>Note that without parent rewriting, it is not really possible to talk
1123about the parent/child relationships between the commits, so we show
1124them disconnected.</p>
1125</div>
1126</dd>
1127<dt class="hdlist1">--full-history with parent rewriting</dt>
1128<dd>
1129<p>Ordinary commits are only included if they are !TREESAME
1130(though this can be changed, see <code>--sparse</code> below).</p>
1131<div class="paragraph">
1132<p>Merges are always included. However, their parent list is rewritten:
1133Along each parent, prune away commits that are not included
1134themselves. This results in</p>
1135</div>
1136<div class="listingblock">
1137<div class="content">
1138<pre> .-A---M---N---O---P---Q
1139 / / / / /
1140 I B / D /
1141 \ / / / /
1142 `-------------'</pre>
1143</div>
1144</div>
1145<div class="paragraph">
1146<p>Compare to <code>--full-history</code> without rewriting above. Note that <code>E</code>
1147was pruned away because it is TREESAME, but the parent list of P was
1148rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1149<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p>
1150</div>
1151</dd>
1152</dl>
1153</div>
1154<div class="paragraph">
1155<p>In addition to the above settings, you can change whether TREESAME
1156affects inclusion:</p>
1157</div>
1158<div class="dlist">
1159<dl>
1160<dt class="hdlist1">--dense</dt>
1161<dd>
1162<p>Commits that are walked are included if they are not TREESAME
1163to any parent.</p>
1164</dd>
1165<dt class="hdlist1">--sparse</dt>
1166<dd>
1167<p>All commits that are walked are included.</p>
1168<div class="paragraph">
1169<p>Note that without <code>--full-history</code>, this still simplifies merges: if
1170one of the parents is TREESAME, we follow only that one, so the other
1171sides of the merge are never walked.</p>
1172</div>
1173</dd>
1174<dt class="hdlist1">--simplify-merges</dt>
1175<dd>
1176<p>First, build a history graph in the same way that
1177<code>--full-history</code> with parent rewriting does (see above).</p>
1178<div class="paragraph">
1179<p>Then simplify each commit <code>C</code> to its replacement <code>C'</code> in the final
1180history according to the following rules:</p>
1181</div>
1182<div class="openblock">
1183<div class="content">
1184<div class="ulist">
1185<ul>
1186<li>
1187<p>Set <code>C'</code> to <code>C</code>.</p>
1188</li>
1189<li>
1190<p>Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
1191the process, drop parents that are ancestors of other parents or that are
1192root commits TREESAME to an empty tree, and remove duplicates, but take care
1193to never drop all parents that we are TREESAME to.</p>
1194</li>
1195<li>
1196<p>If after this parent rewriting, <code>C'</code> is a root or merge commit (has
1197zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1198Otherwise, it is replaced with its only parent.</p>
1199</li>
1200</ul>
1201</div>
1202</div>
1203</div>
1204<div class="paragraph">
1205<p>The effect of this is best shown by way of comparing to
1206<code>--full-history</code> with parent rewriting. The example turns into:</p>
1207</div>
1208<div class="listingblock">
1209<div class="content">
1210<pre> .-A---M---N---O
1211 / / /
1212 I B D
1213 \ / /
1214 `---------'</pre>
1215</div>
1216</div>
1217<div class="paragraph">
1218<p>Note the major differences in <code>N</code>, <code>P</code>, and <code>Q</code> over <code>--full-history</code>:</p>
1219</div>
1220<div class="openblock">
1221<div class="content">
1222<div class="ulist">
1223<ul>
1224<li>
1225<p><code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1226other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.</p>
1227</li>
1228<li>
1229<p><code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
1230removed completely, because it had one parent and is TREESAME.</p>
1231</li>
1232<li>
1233<p><code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1234was a TREESAME root. <code>Q</code> was then removed completely, because it had one
1235parent and is TREESAME.</p>
1236</li>
1237</ul>
1238</div>
1239</div>
1240</div>
1241</dd>
1242</dl>
1243</div>
1244<div class="paragraph">
1245<p>There is another simplification mode available:</p>
1246</div>
1247<div class="dlist">
1248<dl>
1249<dt class="hdlist1">--ancestry-path[=&lt;commit&gt;]</dt>
1250<dd>
1251<p>Limit the displayed commits to those which are an ancestor of
1252&lt;commit&gt;, or which are a descendant of &lt;commit&gt;, or are &lt;commit&gt;
1253itself.</p>
1254<div class="paragraph">
1255<p>As an example use case, consider the following commit history:</p>
1256</div>
1257<div class="listingblock">
1258<div class="content">
1259<pre> D---E-------F
1260 / \ \
1261 B---C---G---H---I---J
1262 / \
1263 A-------K---------------L--M</pre>
1264</div>
1265</div>
1266<div class="paragraph">
1267<p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1268but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1269what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1270that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1271example would be all the commits, except <code>A</code> and <code>B</code> (and <code>D</code> itself,
1272of course).</p>
1273</div>
1274<div class="paragraph">
1275<p>When we want to find out what commits in <code>M</code> are contaminated with the
1276bug introduced by <code>D</code> and need fixing, however, we might want to view
1277only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1278excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
1279option does. Applied to the <em>D..M</em> range, it results in:</p>
1280</div>
1281<div class="listingblock">
1282<div class="content">
1283<pre> E-------F
1284 \ \
1285 G---H---I---J
1286 \
1287 L--M</pre>
1288</div>
1289</div>
1290<div class="paragraph">
1291<p>We can also use <code>--ancestry-path=D</code> instead of <code>--ancestry-path</code> which
1292means the same thing when applied to the <em>D..M</em> range but is just more
1293explicit.</p>
1294</div>
1295<div class="paragraph">
1296<p>If we instead are interested in a given topic within this range, and all
1297commits affected by that topic, we may only want to view the subset of
1298<code>D..M</code> which contain that topic in their ancestry path. So, using
1299<code>--ancestry-path=H D..M</code> for example would result in:</p>
1300</div>
1301<div class="listingblock">
1302<div class="content">
1303<pre> E
1304 \
1305 G---H---I---J
1306 \
1307 L--M</pre>
1308</div>
1309</div>
1310<div class="paragraph">
1311<p>Whereas <code>--ancestry-path=K D..M</code> would result in</p>
1312</div>
1313<div class="listingblock">
1314<div class="content">
1315<pre> K---------------L--M</pre>
1316</div>
1317</div>
1318</dd>
1319</dl>
1320</div>
1321<div class="paragraph">
1322<p>Before discussing another option, <code>--show-pulls</code>, we need to
1323create a new example history.</p>
1324</div>
1325<div class="paragraph">
1326<p>A common problem users face when looking at simplified history is that a
1327commit they know changed a file somehow does not appear in the file&#8217;s
1328simplified history. Let&#8217;s demonstrate a new example and show how options
1329such as <code>--full-history</code> and <code>--simplify-merges</code> works in that case:</p>
1330</div>
1331<div class="listingblock">
1332<div class="content">
1333<pre> .-A---M-----C--N---O---P
1334 / / \ \ \/ / /
1335 I B \ R-'`-Z' /
1336 \ / \/ /
1337 \ / /\ /
1338 `---X--' `---Y--'</pre>
1339</div>
1340</div>
1341<div class="paragraph">
1342<p>For this example, suppose <code>I</code> created <code>file.txt</code> which was modified by
1343<code>A</code>, <code>B</code>, and <code>X</code> in different ways. The single-parent commits <code>C</code>, <code>Z</code>,
1344and <code>Y</code> do not change <code>file.txt</code>. The merge commit <code>M</code> was created by
1345resolving the merge conflict to include both changes from <code>A</code> and <code>B</code>
1346and hence is not TREESAME to either. The merge commit <code>R</code>, however, was
1347created by ignoring the contents of <code>file.txt</code> at <code>M</code> and taking only
1348the contents of <code>file.txt</code> at <code>X</code>. Hence, <code>R</code> is TREESAME to <code>X</code> but not
1349<code>M</code>. Finally, the natural merge resolution to create <code>N</code> is to take the
1350contents of <code>file.txt</code> at <code>R</code>, so <code>N</code> is TREESAME to <code>R</code> but not <code>C</code>.
1351The merge commits <code>O</code> and <code>P</code> are TREESAME to their first parents, but
1352not to their second parents, <code>Z</code> and <code>Y</code> respectively.</p>
1353</div>
1354<div class="paragraph">
1355<p>When using the default mode, <code>N</code> and <code>R</code> both have a TREESAME parent, so
1356those edges are walked and the others are ignored. The resulting history
1357graph is:</p>
1358</div>
1359<div class="listingblock">
1360<div class="content">
1361<pre> I---X</pre>
1362</div>
1363</div>
1364<div class="paragraph">
1365<p>When using <code>--full-history</code>, Git walks every edge. This will discover
1366the commits <code>A</code> and <code>B</code> and the merge <code>M</code>, but also will reveal the
1367merge commits <code>O</code> and <code>P</code>. With parent rewriting, the resulting graph is:</p>
1368</div>
1369<div class="listingblock">
1370<div class="content">
1371<pre> .-A---M--------N---O---P
1372 / / \ \ \/ / /
1373 I B \ R-'`--' /
1374 \ / \/ /
1375 \ / /\ /
1376 `---X--' `------'</pre>
1377</div>
1378</div>
1379<div class="paragraph">
1380<p>Here, the merge commits <code>O</code> and <code>P</code> contribute extra noise, as they did
1381not actually contribute a change to <code>file.txt</code>. They only merged a topic
1382that was based on an older version of <code>file.txt</code>. This is a common
1383issue in repositories using a workflow where many contributors work in
1384parallel and merge their topic branches along a single trunk: many
1385unrelated merges appear in the <code>--full-history</code> results.</p>
1386</div>
1387<div class="paragraph">
1388<p>When using the <code>--simplify-merges</code> option, the commits <code>O</code> and <code>P</code>
1389disappear from the results. This is because the rewritten second parents
1390of <code>O</code> and <code>P</code> are reachable from their first parents. Those edges are
1391removed and then the commits look like single-parent commits that are
1392TREESAME to their parent. This also happens to the commit <code>N</code>, resulting
1393in a history view as follows:</p>
1394</div>
1395<div class="listingblock">
1396<div class="content">
1397<pre> .-A---M--.
1398 / / \
1399 I B R
1400 \ / /
1401 \ / /
1402 `---X--'</pre>
1403</div>
1404</div>
1405<div class="paragraph">
1406<p>In this view, we see all of the important single-parent changes from
1407<code>A</code>, <code>B</code>, and <code>X</code>. We also see the carefully-resolved merge <code>M</code> and the
1408not-so-carefully-resolved merge <code>R</code>. This is usually enough information
1409to determine why the commits <code>A</code> and <code>B</code> "disappeared" from history in
1410the default view. However, there are a few issues with this approach.</p>
1411</div>
1412<div class="paragraph">
1413<p>The first issue is performance. Unlike any previous option, the
1414<code>--simplify-merges</code> option requires walking the entire commit history
1415before returning a single result. This can make the option difficult to
1416use for very large repositories.</p>
1417</div>
1418<div class="paragraph">
1419<p>The second issue is one of auditing. When many contributors are working
1420on the same repository, it is important which merge commits introduced
1421a change into an important branch. The problematic merge <code>R</code> above is
1422not likely to be the merge commit that was used to merge into an
1423important branch. Instead, the merge <code>N</code> was used to merge <code>R</code> and <code>X</code>
1424into the important branch. This commit may have information about why
1425the change <code>X</code> came to override the changes from <code>A</code> and <code>B</code> in its
1426commit message.</p>
1427</div>
1428<div class="dlist">
1429<dl>
1430<dt class="hdlist1">--show-pulls</dt>
1431<dd>
1432<p>In addition to the commits shown in the default history, show
1433each merge commit that is not TREESAME to its first parent but
1434is TREESAME to a later parent.</p>
1435<div class="paragraph">
1436<p>When a merge commit is included by <code>--show-pulls</code>, the merge is
1437treated as if it "pulled" the change from another branch. When using
1438<code>--show-pulls</code> on this example (and no other options) the resulting
1439graph is:</p>
1440</div>
1441<div class="listingblock">
1442<div class="content">
1443<pre> I---X---R---N</pre>
1444</div>
1445</div>
1446<div class="paragraph">
1447<p>Here, the merge commits <code>R</code> and <code>N</code> are included because they pulled
1448the commits <code>X</code> and <code>R</code> into the base branch, respectively. These
1449merges are the reason the commits <code>A</code> and <code>B</code> do not appear in the
1450default history.</p>
1451</div>
1452<div class="paragraph">
1453<p>When <code>--show-pulls</code> is paired with <code>--simplify-merges</code>, the
1454graph includes all of the necessary information:</p>
1455</div>
1456<div class="listingblock">
1457<div class="content">
1458<pre> .-A---M--. N
1459 / / \ /
1460 I B R
1461 \ / /
1462 \ / /
1463 `---X--'</pre>
1464</div>
1465</div>
1466<div class="paragraph">
1467<p>Notice that since <code>M</code> is reachable from <code>R</code>, the edge from <code>N</code> to <code>M</code>
1468was simplified away. However, <code>N</code> still appears in the history as an
1469important commit because it "pulled" the change <code>R</code> into the main
1470branch.</p>
1471</div>
1472</dd>
1473</dl>
1474</div>
1475<div class="paragraph">
1476<p>The <code>--simplify-by-decoration</code> option allows you to view only the
1477big picture of the topology of the history, by omitting commits
1478that are not referenced by tags. Commits are marked as !TREESAME
1479(in other words, kept after history simplification rules described
1480above) if (1) they are referenced by tags, or (2) they change the
1481contents of the paths given on the command line. All other
1482commits are marked as TREESAME (subject to be simplified away).</p>
1483</div>
1484</div>
1485<div class="sect2">
1486<h3 id="_bisection_helpers">Bisection Helpers</h3>
1487<div class="dlist">
1488<dl>
1489<dt class="hdlist1">--bisect</dt>
1490<dd>
1491<p>Limit output to the one commit object which is roughly halfway between
1492included and excluded commits. Note that the bad bisection ref
1493<code>refs/bisect/bad</code> is added to the included commits (if it
1494exists) and the good bisection refs <code>refs/bisect/good-*</code> are
1495added to the excluded commits (if they exist). Thus, supposing there
1496are no refs in <code>refs/bisect/</code>, if</p>
1497<div class="listingblock">
1498<div class="content">
1499<pre> $ git rev-list --bisect foo ^bar ^baz</pre>
1500</div>
1501</div>
1502<div class="paragraph">
1503<p>outputs <em>midpoint</em>, the output of the two commands</p>
1504</div>
1505<div class="listingblock">
1506<div class="content">
1507<pre> $ git rev-list foo ^midpoint
1508 $ git rev-list midpoint ^bar ^baz</pre>
1509</div>
1510</div>
1511<div class="paragraph">
1512<p>would be of roughly the same length. Finding the change which
1513introduces a regression is thus reduced to a binary search: repeatedly
1514generate and test new 'midpoint&#8217;s until the commit chain is of length
1515one.</p>
1516</div>
1517</dd>
1518<dt class="hdlist1">--bisect-vars</dt>
1519<dd>
1520<p>This calculates the same as <code>--bisect</code>, except that refs in
1521<code>refs/bisect/</code> are not used, and except that this outputs
1522text ready to be eval&#8217;ed by the shell. These lines will assign the
1523name of the midpoint revision to the variable <code>bisect_rev</code>, and the
1524expected number of commits to be tested after <code>bisect_rev</code> is tested
1525to <code>bisect_nr</code>, the expected number of commits to be tested if
1526<code>bisect_rev</code> turns out to be good to <code>bisect_good</code>, the expected
1527number of commits to be tested if <code>bisect_rev</code> turns out to be bad to
1528<code>bisect_bad</code>, and the number of commits we are bisecting right now to
1529<code>bisect_all</code>.</p>
1530</dd>
1531<dt class="hdlist1">--bisect-all</dt>
1532<dd>
1533<p>This outputs all the commit objects between the included and excluded
1534commits, ordered by their distance to the included and excluded
1535commits. Refs in <code>refs/bisect/</code> are not used. The farthest
1536from them is displayed first. (This is the only one displayed by
1537<code>--bisect</code>.)</p>
1538<div class="paragraph">
1539<p>This is useful because it makes it easy to choose a good commit to
1540test when you want to avoid to test some of them for some reason (they
1541may not compile for example).</p>
1542</div>
1543<div class="paragraph">
1544<p>This option can be used along with <code>--bisect-vars</code>, in this case,
1545after all the sorted commit objects, there will be the same text as if
1546<code>--bisect-vars</code> had been used alone.</p>
1547</div>
1548</dd>
1549</dl>
1550</div>
1551</div>
1552<div class="sect2">
1553<h3 id="_commit_ordering">Commit Ordering</h3>
1554<div class="paragraph">
1555<p>By default, the commits are shown in reverse chronological order.</p>
1556</div>
1557<div class="dlist">
1558<dl>
1559<dt class="hdlist1">--date-order</dt>
1560<dd>
1561<p>Show no parents before all of its children are shown, but
1562otherwise show commits in the commit timestamp order.</p>
1563</dd>
1564<dt class="hdlist1">--author-date-order</dt>
1565<dd>
1566<p>Show no parents before all of its children are shown, but
1567otherwise show commits in the author timestamp order.</p>
1568</dd>
1569<dt class="hdlist1">--topo-order</dt>
1570<dd>
1571<p>Show no parents before all of its children are shown, and
1572avoid showing commits on multiple lines of history
1573intermixed.</p>
1574<div class="paragraph">
1575<p>For example, in a commit history like this:</p>
1576</div>
1577<div class="listingblock">
1578<div class="content">
1579<pre> ---1----2----4----7
1580 \ \
1581 3----5----6----8---</pre>
1582</div>
1583</div>
1584<div class="paragraph">
1585<p>where the numbers denote the order of commit timestamps, <code>git
1586rev-list</code> and friends with <code>--date-order</code> show the commits in the
1587timestamp order: 8 7 6 5 4 3 2 1.</p>
1588</div>
1589<div class="paragraph">
1590<p>With <code>--topo-order</code>, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
15913 1); some older commits are shown before newer ones in order to
1592avoid showing the commits from two parallel development track mixed
1593together.</p>
1594</div>
1595</dd>
1596<dt class="hdlist1">--reverse</dt>
1597<dd>
1598<p>Output the commits chosen to be shown (see Commit Limiting
1599section above) in reverse order. Cannot be combined with
1600<code>--walk-reflogs</code>.</p>
1601</dd>
1602</dl>
1603</div>
1604</div>
1605<div class="sect2">
1606<h3 id="_object_traversal">Object Traversal</h3>
1607<div class="paragraph">
1608<p>These options are mostly targeted for packing of Git repositories.</p>
1609</div>
1610<div class="dlist">
1611<dl>
1612<dt class="hdlist1">--objects</dt>
1613<dd>
1614<p>Print the object IDs of any object referenced by the listed
1615commits. <code>--objects foo ^bar</code> thus means &#8220;send me
1616all object IDs which I need to download if I have the commit
1617object <em>bar</em> but not <em>foo</em>&#8221;. See also <code>--object-names</code> below.</p>
1618</dd>
1619<dt class="hdlist1">--in-commit-order</dt>
1620<dd>
1621<p>Print tree and blob ids in order of the commits. The tree
1622and blob ids are printed after they are first referenced
1623by a commit.</p>
1624</dd>
1625<dt class="hdlist1">--objects-edge</dt>
1626<dd>
1627<p>Similar to <code>--objects</code>, but also print the IDs of excluded
1628commits prefixed with a &#8220;-&#8221; character. This is used by
1629<a href="git-pack-objects.html">git-pack-objects(1)</a> to build a &#8220;thin&#8221; pack, which records
1630objects in deltified form based on objects contained in these
1631excluded commits to reduce network traffic.</p>
1632</dd>
1633<dt class="hdlist1">--objects-edge-aggressive</dt>
1634<dd>
1635<p>Similar to <code>--objects-edge</code>, but it tries harder to find excluded
1636commits at the cost of increased time. This is used instead of
1637<code>--objects-edge</code> to build &#8220;thin&#8221; packs for shallow repositories.</p>
1638</dd>
1639<dt class="hdlist1">--indexed-objects</dt>
1640<dd>
1641<p>Pretend as if all trees and blobs used by the index are listed
1642on the command line. Note that you probably want to use
1643<code>--objects</code>, too.</p>
1644</dd>
1645<dt class="hdlist1">--unpacked</dt>
1646<dd>
1647<p>Only useful with <code>--objects</code>; print the object IDs that are not
1648in packs.</p>
1649</dd>
1650<dt class="hdlist1">--object-names</dt>
1651<dd>
1652<p>Only useful with <code>--objects</code>; print the names of the object IDs
1653that are found. This is the default behavior. Note that the
1654"name" of each object is ambiguous, and mostly intended as a
1655hint for packing objects. In particular: no distinction is made between
1656the names of tags, trees, and blobs; path names may be modified
1657to remove newlines; and if an object would appear multiple times
1658with different names, only one name is shown.</p>
1659</dd>
1660<dt class="hdlist1">--no-object-names</dt>
1661<dd>
1662<p>Only useful with <code>--objects</code>; does not print the names of the object
1663IDs that are found. This inverts <code>--object-names</code>. This flag allows
1664the output to be more easily parsed by commands such as
1665<a href="git-cat-file.html">git-cat-file(1)</a>.</p>
1666</dd>
1667<dt class="hdlist1">--filter=&lt;filter-spec&gt;</dt>
1668<dd>
1669<p>Only useful with one of the <code>--objects*</code>; omits objects (usually
1670blobs) from the list of printed objects. The <em>&lt;filter-spec&gt;</em>
1671may be one of the following:</p>
1672<div class="paragraph">
1673<p>The form <em>--filter=blob:none</em> omits all blobs.</p>
1674</div>
1675<div class="paragraph">
1676<p>The form <em>--filter=blob:limit=&lt;n&gt;[kmg]</em> omits blobs of size at least n
1677bytes or units. n may be zero. The suffixes k, m, and g can be used
1678to name units in KiB, MiB, or GiB. For example, <em>blob:limit=1k</em>
1679is the same as <em>blob:limit=1024</em>.</p>
1680</div>
1681<div class="paragraph">
1682<p>The form <em>--filter=object:type=(tag|commit|tree|blob)</em> omits all objects
1683which are not of the requested type.</p>
1684</div>
1685<div class="paragraph">
1686<p>The form <em>--filter=sparse:oid=&lt;blob-ish&gt;</em> uses a sparse-checkout
1687specification contained in the blob (or blob-expression) <em>&lt;blob-ish&gt;</em>
1688to omit blobs that would not be required for a sparse checkout on
1689the requested refs.</p>
1690</div>
1691<div class="paragraph">
1692<p>The form <em>--filter=tree:&lt;depth&gt;</em> omits all blobs and trees whose depth
1693from the root tree is &gt;= &lt;depth&gt; (minimum depth if an object is located
1694at multiple depths in the commits traversed). &lt;depth&gt;=0 will not include
1695any trees or blobs unless included explicitly in the command-line (or
1696standard input when --stdin is used). &lt;depth&gt;=1 will include only the
1697tree and blobs which are referenced directly by a commit reachable from
1698&lt;commit&gt; or an explicitly-given object. &lt;depth&gt;=2 is like &lt;depth&gt;=1
1699while also including trees and blobs one more level removed from an
1700explicitly-given commit or tree.</p>
1701</div>
1702<div class="paragraph">
1703<p>Note that the form <em>--filter=sparse:path=&lt;path&gt;</em> that wants to read
1704from an arbitrary path on the filesystem has been dropped for security
1705reasons.</p>
1706</div>
1707<div class="paragraph">
1708<p>Multiple <em>--filter=</em> flags can be specified to combine filters. Only
1709objects which are accepted by every filter are included.</p>
1710</div>
1711<div class="paragraph">
1712<p>The form <em>--filter=combine:&lt;filter1&gt;+&lt;filter2&gt;+&#8230;&#8203;&lt;filterN&gt;</em> can also be
1713used to combined several filters, but this is harder than just repeating
1714the <em>--filter</em> flag and is usually not necessary. Filters are joined by
1715<em>&#43;</em> and individual filters are %-encoded (i.e. URL-encoded).
1716Besides the <em>&#43;</em> and <em>%</em> characters, the following characters are
1717reserved and also must be encoded: <code>~!@#$^&amp;*()[]{}\;",&lt;&gt;?</code><code>&#39;&#96;</code>
1718as well as all characters with ASCII code &lt;= <code>0x20</code>, which includes
1719space and newline.</p>
1720</div>
1721<div class="paragraph">
1722<p>Other arbitrary characters can also be encoded. For instance,
1723<em>combine:tree:3+blob:none</em> and <em>combine:tree%3A3+blob%3Anone</em> are
1724equivalent.</p>
1725</div>
1726</dd>
1727<dt class="hdlist1">--no-filter</dt>
1728<dd>
1729<p>Turn off any previous <code>--filter=</code> argument.</p>
1730</dd>
1731<dt class="hdlist1">--filter-provided-objects</dt>
1732<dd>
1733<p>Filter the list of explicitly provided objects, which would otherwise
1734always be printed even if they did not match any of the filters. Only
1735useful with <code>--filter=</code>.</p>
1736</dd>
1737<dt class="hdlist1">--filter-print-omitted</dt>
1738<dd>
1739<p>Only useful with <code>--filter=</code>; prints a list of the objects omitted
1740by the filter. Object IDs are prefixed with a &#8220;~&#8221; character.</p>
1741</dd>
1742<dt class="hdlist1">--missing=&lt;missing-action&gt;</dt>
1743<dd>
1744<p>A debug option to help with future "partial clone" development.
1745This option specifies how missing objects are handled.</p>
1746<div class="paragraph">
1747<p>The form <em>--missing=error</em> requests that rev-list stop with an error if
1748a missing object is encountered. This is the default action.</p>
1749</div>
1750<div class="paragraph">
1751<p>The form <em>--missing=allow-any</em> will allow object traversal to continue
1752if a missing object is encountered. Missing objects will silently be
1753omitted from the results.</p>
1754</div>
1755<div class="paragraph">
1756<p>The form <em>--missing=allow-promisor</em> is like <em>allow-any</em>, but will only
1757allow object traversal to continue for EXPECTED promisor missing objects.
1758Unexpected missing objects will raise an error.</p>
1759</div>
1760<div class="paragraph">
1761<p>The form <em>--missing=print</em> is like <em>allow-any</em>, but will also print a
1762list of the missing objects. Object IDs are prefixed with a &#8220;?&#8221; character.</p>
1763</div>
1764<div class="paragraph">
1765<p>If some tips passed to the traversal are missing, they will be
1766considered as missing too, and the traversal will ignore them. In case
1767we cannot get their Object ID though, an error will be raised.</p>
1768</div>
1769</dd>
1770<dt class="hdlist1">--exclude-promisor-objects</dt>
1771<dd>
1772<p>(For internal use only.) Prefilter object traversal at
1773promisor boundary. This is used with partial clone. This is
1774stronger than <code>--missing=allow-promisor</code> because it limits the
1775traversal, rather than just silencing errors about missing
1776objects.</p>
1777</dd>
1778<dt class="hdlist1">--no-walk[=(sorted|unsorted)]</dt>
1779<dd>
1780<p>Only show the given commits, but do not traverse their ancestors.
1781This has no effect if a range is specified. If the argument
1782<code>unsorted</code> is given, the commits are shown in the order they were
1783given on the command line. Otherwise (if <code>sorted</code> or no argument
1784was given), the commits are shown in reverse chronological order
1785by commit time.
1786Cannot be combined with <code>--graph</code>.</p>
1787</dd>
1788<dt class="hdlist1">--do-walk</dt>
1789<dd>
1790<p>Overrides a previous <code>--no-walk</code>.</p>
1791</dd>
1792</dl>
1793</div>
1794</div>
1795<div class="sect2">
1796<h3 id="_commit_formatting">Commit Formatting</h3>
1797<div class="paragraph">
1798<p>Using these options, <a href="git-rev-list.html">git-rev-list(1)</a> will act similar to the
1799more specialized family of commit log tools: <a href="git-log.html">git-log(1)</a>,
1800<a href="git-show.html">git-show(1)</a>, and <a href="git-whatchanged.html">git-whatchanged(1)</a></p>
1801</div>
1802<div class="dlist">
1803<dl>
1804<dt class="hdlist1">--pretty[=&lt;format&gt;]</dt>
1805<dt class="hdlist1">--format=&lt;format&gt;</dt>
1806<dd>
1807<p>Pretty-print the contents of the commit logs in a given format,
1808where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1809<em>full</em>, <em>fuller</em>, <em>reference</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1810and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1811and has <em>%placeholder</em> in it, it acts as if
1812<em>--pretty=tformat:&lt;format&gt;</em> were given.</p>
1813<div class="paragraph">
1814<p>See the "PRETTY FORMATS" section for some additional details for each
1815format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p>
1816</div>
1817<div class="paragraph">
1818<p>Note: you can specify the default pretty format in the repository
1819configuration (see <a href="git-config.html">git-config(1)</a>).</p>
1820</div>
1821</dd>
1822<dt class="hdlist1">--abbrev-commit</dt>
1823<dd>
1824<p>Instead of showing the full 40-byte hexadecimal commit object
1825name, show a prefix that names the object uniquely.
1826"--abbrev=&lt;n&gt;" (which also modifies diff output, if it is displayed)
1827option can be used to specify the minimum length of the prefix.</p>
1828<div class="paragraph">
1829<p>This should make "--pretty=oneline" a whole lot more readable for
1830people using 80-column terminals.</p>
1831</div>
1832</dd>
1833<dt class="hdlist1">--no-abbrev-commit</dt>
1834<dd>
1835<p>Show the full 40-byte hexadecimal commit object name. This negates
1836<code>--abbrev-commit</code>, either explicit or implied by other options such
1837as "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.</p>
1838</dd>
1839<dt class="hdlist1">--oneline</dt>
1840<dd>
1841<p>This is a shorthand for "--pretty=oneline --abbrev-commit"
1842used together.</p>
1843</dd>
1844<dt class="hdlist1">--encoding=&lt;encoding&gt;</dt>
1845<dd>
1846<p>Commit objects record the character encoding used for the log message
1847in their encoding header; this option can be used to tell the
1848command to re-code the commit log message in the encoding
1849preferred by the user. For non plumbing commands this
1850defaults to UTF-8. Note that if an object claims to be encoded
1851in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1852verbatim; this means that invalid sequences in the original
1853commit may be copied to the output. Likewise, if iconv(3) fails
1854to convert the commit, we will quietly output the original
1855object verbatim.</p>
1856</dd>
1857<dt class="hdlist1">--expand-tabs=&lt;n&gt;</dt>
1858<dt class="hdlist1">--expand-tabs</dt>
1859<dt class="hdlist1">--no-expand-tabs</dt>
1860<dd>
1861<p>Perform a tab expansion (replace each tab with enough spaces
1862to fill to the next display column that is a multiple of <em>&lt;n&gt;</em>)
1863in the log message before showing it in the output.
1864<code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1865<code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1866which disables tab expansion.</p>
1867<div class="paragraph">
1868<p>By default, tabs are expanded in pretty formats that indent the log
1869message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1870and <em>fuller</em>).</p>
1871</div>
1872</dd>
1873<dt class="hdlist1">--show-signature</dt>
1874<dd>
1875<p>Check the validity of a signed commit object by passing the signature
1876to <code>gpg --verify</code> and show the output.</p>
1877</dd>
1878<dt class="hdlist1">--relative-date</dt>
1879<dd>
1880<p>Synonym for <code>--date=relative</code>.</p>
1881</dd>
1882<dt class="hdlist1">--date=&lt;format&gt;</dt>
1883<dd>
1884<p>Only takes effect for dates shown in human-readable format, such
1885as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
1886value for the log command&#8217;s <code>--date</code> option. By default, dates
1887are shown in the original time zone (either committer&#8217;s or
1888author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
1889<code>iso-local</code>), the user&#8217;s local time zone is used instead.</p>
1890<div class="openblock">
1891<div class="content">
1892<div class="paragraph">
1893<p><code>--date=relative</code> shows dates relative to the current time,
1894e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
1895<code>--date=relative</code>.</p>
1896</div>
1897<div class="paragraph">
1898<p><code>--date=local</code> is an alias for <code>--date=default-local</code>.</p>
1899</div>
1900<div class="paragraph">
1901<p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
1902The differences to the strict ISO 8601 format are:</p>
1903</div>
1904<div class="ulist">
1905<ul>
1906<li>
1907<p>a space instead of the <code>T</code> date/time delimiter</p>
1908</li>
1909<li>
1910<p>a space between time and time zone</p>
1911</li>
1912<li>
1913<p>no colon between hours and minutes of the time zone</p>
1914</li>
1915</ul>
1916</div>
1917<div class="paragraph">
1918<p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
1919ISO 8601 format.</p>
1920</div>
1921<div class="paragraph">
1922<p><code>--date=rfc</code> (or <code>--date=rfc2822</code>) shows timestamps in RFC 2822
1923format, often found in email messages.</p>
1924</div>
1925<div class="paragraph">
1926<p><code>--date=short</code> shows only the date, but not the time, in <code>YYYY-MM-DD</code> format.</p>
1927</div>
1928<div class="paragraph">
1929<p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
193000:00:00 UTC), followed by a space, and then the timezone as an offset
1931from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
1932the second two are minutes). I.e., as if the timestamp were formatted
1933with <code>strftime("%s %z")</code>).
1934Note that the <code>-local</code> option does not affect the seconds-since-epoch
1935value (which is always measured in UTC), but does switch the accompanying
1936timezone value.</p>
1937</div>
1938<div class="paragraph">
1939<p><code>--date=human</code> shows the timezone if the timezone does not match the
1940current time-zone, and doesn&#8217;t print the whole date if that matches
1941(ie skip printing year for dates that are "this year", but also skip
1942the whole date itself if it&#8217;s in the last few days and we can just say
1943what weekday it was). For older dates the hour and minute is also
1944omitted.</p>
1945</div>
1946<div class="paragraph">
1947<p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
19481970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
1949has no effect.</p>
1950</div>
1951<div class="paragraph">
1952<p><code>--date=format:...</code> feeds the format <code>...</code> to your system <code>strftime</code>,
1953except for %s, %z, and %Z, which are handled internally.
1954Use <code>--date=format:%c</code> to show the date in your system locale&#8217;s
1955preferred format. See the <code>strftime</code> manual for a complete list of
1956format placeholders. When using <code>-local</code>, the correct syntax is
1957<code>--date=format-local:...</code>.</p>
1958</div>
1959<div class="paragraph">
1960<p><code>--date=default</code> is the default format, and is based on ctime(3)
1961output. It shows a single line with three-letter day of the week,
1962three-letter month, day-of-month, hour-minute-seconds in "HH:MM:SS"
1963format, followed by 4-digit year, plus timezone information, unless
1964the local time zone is used, e.g. <code>Thu Jan 1 00:00:00 1970 +0000</code>.</p>
1965</div>
1966</div>
1967</div>
1968</dd>
1969<dt class="hdlist1">--header</dt>
1970<dd>
1971<p>Print the contents of the commit in raw-format; each record is
1972separated with a NUL character.</p>
1973</dd>
1974<dt class="hdlist1">--no-commit-header</dt>
1975<dd>
1976<p>Suppress the header line containing "commit" and the object ID printed before
1977the specified format. This has no effect on the built-in formats; only custom
1978formats are affected.</p>
1979</dd>
1980<dt class="hdlist1">--commit-header</dt>
1981<dd>
1982<p>Overrides a previous <code>--no-commit-header</code>.</p>
1983</dd>
1984<dt class="hdlist1">--parents</dt>
1985<dd>
1986<p>Print also the parents of the commit (in the form "commit parent&#8230;&#8203;").
1987Also enables parent rewriting, see <em>History Simplification</em> above.</p>
1988</dd>
1989<dt class="hdlist1">--children</dt>
1990<dd>
1991<p>Print also the children of the commit (in the form "commit child&#8230;&#8203;").
1992Also enables parent rewriting, see <em>History Simplification</em> above.</p>
1993</dd>
1994<dt class="hdlist1">--timestamp</dt>
1995<dd>
1996<p>Print the raw commit timestamp.</p>
1997</dd>
1998<dt class="hdlist1">--left-right</dt>
1999<dd>
2000<p>Mark which side of a symmetric difference a commit is reachable from.
2001Commits from the left side are prefixed with <code>&lt;</code> and those from
2002the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2003commits are prefixed with <code>-</code>.</p>
2004<div class="paragraph">
2005<p>For example, if you have this topology:</p>
2006</div>
2007<div class="listingblock">
2008<div class="content">
2009<pre> y---b---b branch B
2010 / \ /
2011 / .
2012 / / \
2013 o---x---a---a branch A</pre>
2014</div>
2015</div>
2016<div class="paragraph">
2017<p>you would get an output like this:</p>
2018</div>
2019<div class="listingblock">
2020<div class="content">
2021<pre> $ git rev-list --left-right --boundary --pretty=oneline A...B
2022
2023 &gt;bbbbbbb... 3rd on b
2024 &gt;bbbbbbb... 2nd on b
2025 &lt;aaaaaaa... 3rd on a
2026 &lt;aaaaaaa... 2nd on a
2027 -yyyyyyy... 1st on b
2028 -xxxxxxx... 1st on a</pre>
2029</div>
2030</div>
2031</dd>
2032<dt class="hdlist1">--graph</dt>
2033<dd>
2034<p>Draw a text-based graphical representation of the commit history
2035on the left hand side of the output. This may cause extra lines
2036to be printed in between commits, in order for the graph history
2037to be drawn properly.
2038Cannot be combined with <code>--no-walk</code>.</p>
2039<div class="paragraph">
2040<p>This enables parent rewriting, see <em>History Simplification</em> above.</p>
2041</div>
2042<div class="paragraph">
2043<p>This implies the <code>--topo-order</code> option by default, but the
2044<code>--date-order</code> option may also be specified.</p>
2045</div>
2046</dd>
2047<dt class="hdlist1">--show-linear-break[=&lt;barrier&gt;]</dt>
2048<dd>
2049<p>When --graph is not used, all history branches are flattened
2050which can make it hard to see that the two consecutive commits
2051do not belong to a linear branch. This option puts a barrier
2052in between them in that case. If <code>&lt;barrier&gt;</code> is specified, it
2053is the string that will be shown instead of the default one.</p>
2054</dd>
2055<dt class="hdlist1">--count</dt>
2056<dd>
2057<p>Print a number stating how many commits would have been
2058listed, and suppress all other output. When used together
2059with <code>--left-right</code>, instead print the counts for left and
2060right commits, separated by a tab. When used together with
2061<code>--cherry-mark</code>, omit patch equivalent commits from these
2062counts and print the count for equivalent commits separated
2063by a tab.</p>
2064</dd>
2065</dl>
2066</div>
2067</div>
2068</div>
2069</div>
2070<div class="sect1">
2071<h2 id="_pretty_formats">PRETTY FORMATS</h2>
2072<div class="sectionbody">
2073<div class="paragraph">
2074<p>If the commit is a merge, and if the pretty-format
2075is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2076inserted before the <em>Author:</em> line. This line begins with
2077"Merge: " and the hashes of ancestral commits are printed,
2078separated by spaces. Note that the listed commits may not
2079necessarily be the list of the <strong>direct</strong> parent commits if you
2080have limited your view of history: for example, if you are
2081only interested in changes related to a certain directory or
2082file.</p>
2083</div>
2084<div class="paragraph">
2085<p>There are several built-in formats, and you can define
2086additional formats by setting a pretty.&lt;name&gt;
2087config option to either another format name, or a
2088<em>format:</em> string, as described below (see
2089<a href="git-config.html">git-config(1)</a>). Here are the details of the
2090built-in formats:</p>
2091</div>
2092<div class="ulist">
2093<ul>
2094<li>
2095<p><em>oneline</em></p>
2096<div class="literalblock">
2097<div class="content">
2098<pre>&lt;hash&gt; &lt;title-line&gt;</pre>
2099</div>
2100</div>
2101<div class="paragraph">
2102<p>This is designed to be as compact as possible.</p>
2103</div>
2104</li>
2105<li>
2106<p><em>short</em></p>
2107<div class="literalblock">
2108<div class="content">
2109<pre>commit &lt;hash&gt;
2110Author: &lt;author&gt;</pre>
2111</div>
2112</div>
2113<div class="literalblock">
2114<div class="content">
2115<pre>&lt;title-line&gt;</pre>
2116</div>
2117</div>
2118</li>
2119<li>
2120<p><em>medium</em></p>
2121<div class="literalblock">
2122<div class="content">
2123<pre>commit &lt;hash&gt;
2124Author: &lt;author&gt;
2125Date: &lt;author-date&gt;</pre>
2126</div>
2127</div>
2128<div class="literalblock">
2129<div class="content">
2130<pre>&lt;title-line&gt;</pre>
2131</div>
2132</div>
2133<div class="literalblock">
2134<div class="content">
2135<pre>&lt;full-commit-message&gt;</pre>
2136</div>
2137</div>
2138</li>
2139<li>
2140<p><em>full</em></p>
2141<div class="literalblock">
2142<div class="content">
2143<pre>commit &lt;hash&gt;
2144Author: &lt;author&gt;
2145Commit: &lt;committer&gt;</pre>
2146</div>
2147</div>
2148<div class="literalblock">
2149<div class="content">
2150<pre>&lt;title-line&gt;</pre>
2151</div>
2152</div>
2153<div class="literalblock">
2154<div class="content">
2155<pre>&lt;full-commit-message&gt;</pre>
2156</div>
2157</div>
2158</li>
2159<li>
2160<p><em>fuller</em></p>
2161<div class="literalblock">
2162<div class="content">
2163<pre>commit &lt;hash&gt;
2164Author: &lt;author&gt;
2165AuthorDate: &lt;author-date&gt;
2166Commit: &lt;committer&gt;
2167CommitDate: &lt;committer-date&gt;</pre>
2168</div>
2169</div>
2170<div class="literalblock">
2171<div class="content">
2172<pre>&lt;title-line&gt;</pre>
2173</div>
2174</div>
2175<div class="literalblock">
2176<div class="content">
2177<pre>&lt;full-commit-message&gt;</pre>
2178</div>
2179</div>
2180</li>
2181<li>
2182<p><em>reference</em></p>
2183<div class="literalblock">
2184<div class="content">
2185<pre>&lt;abbrev-hash&gt; (&lt;title-line&gt;, &lt;short-author-date&gt;)</pre>
2186</div>
2187</div>
2188<div class="paragraph">
2189<p>This format is used to refer to another commit in a commit message and
2190is the same as <code>--pretty='format:%C(auto)%h (%s, %ad)'</code>. By default,
2191the date is formatted with <code>--date=short</code> unless another <code>--date</code> option
2192is explicitly specified. As with any <code>format:</code> with format
2193placeholders, its output is not affected by other options like
2194<code>--decorate</code> and <code>--walk-reflogs</code>.</p>
2195</div>
2196</li>
2197<li>
2198<p><em>email</em></p>
2199<div class="literalblock">
2200<div class="content">
2201<pre>From &lt;hash&gt; &lt;date&gt;
2202From: &lt;author&gt;
2203Date: &lt;author-date&gt;
2204Subject: [PATCH] &lt;title-line&gt;</pre>
2205</div>
2206</div>
2207<div class="literalblock">
2208<div class="content">
2209<pre>&lt;full-commit-message&gt;</pre>
2210</div>
2211</div>
2212</li>
2213<li>
2214<p><em>mboxrd</em></p>
2215<div class="paragraph">
2216<p>Like <em>email</em>, but lines in the commit message starting with "From "
2217(preceded by zero or more "&gt;") are quoted with "&gt;" so they aren&#8217;t
2218confused as starting a new commit.</p>
2219</div>
2220</li>
2221<li>
2222<p><em>raw</em></p>
2223<div class="paragraph">
2224<p>The <em>raw</em> format shows the entire commit exactly as
2225stored in the commit object. Notably, the hashes are
2226displayed in full, regardless of whether --abbrev or
2227--no-abbrev are used, and <em>parents</em> information show the
2228true parent commits, without taking grafts or history
2229simplification into account. Note that this format affects the way
2230commits are displayed, but not the way the diff is shown e.g. with
2231<code>git log --raw</code>. To get full object names in a raw diff format,
2232use <code>--no-abbrev</code>.</p>
2233</div>
2234</li>
2235<li>
2236<p><em>format:&lt;format-string&gt;</em></p>
2237<div class="paragraph">
2238<p>The <em>format:&lt;format-string&gt;</em> format allows you to specify which information
2239you want to show. It works a little bit like printf format,
2240with the notable exception that you get a newline with <em>%n</em>
2241instead of <em>\n</em>.</p>
2242</div>
2243<div class="paragraph">
2244<p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
2245would show something like this:</p>
2246</div>
2247<div class="listingblock">
2248<div class="content">
2249<pre>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2250The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</pre>
2251</div>
2252</div>
2253<div class="paragraph">
2254<p>The placeholders are:</p>
2255</div>
2256<div class="ulist">
2257<ul>
2258<li>
2259<p>Placeholders that expand to a single literal character:</p>
2260<div class="dlist">
2261<dl>
2262<dt class="hdlist1"><em>%n</em></dt>
2263<dd>
2264<p>newline</p>
2265</dd>
2266<dt class="hdlist1"><em>%%</em></dt>
2267<dd>
2268<p>a raw <em>%</em></p>
2269</dd>
2270<dt class="hdlist1"><em>%x00</em></dt>
2271<dd>
2272<p><em>%x</em> followed by two hexadecimal digits is replaced with a
2273byte with the hexadecimal digits' value (we will call this
2274"literal formatting code" in the rest of this document).</p>
2275</dd>
2276</dl>
2277</div>
2278</li>
2279<li>
2280<p>Placeholders that affect formatting of later placeholders:</p>
2281<div class="dlist">
2282<dl>
2283<dt class="hdlist1"><em>%Cred</em></dt>
2284<dd>
2285<p>switch color to red</p>
2286</dd>
2287<dt class="hdlist1"><em>%Cgreen</em></dt>
2288<dd>
2289<p>switch color to green</p>
2290</dd>
2291<dt class="hdlist1"><em>%Cblue</em></dt>
2292<dd>
2293<p>switch color to blue</p>
2294</dd>
2295<dt class="hdlist1"><em>%Creset</em></dt>
2296<dd>
2297<p>reset color</p>
2298</dd>
2299<dt class="hdlist1"><em>%C(&#8230;&#8203;)</em></dt>
2300<dd>
2301<p>color specification, as described under Values in the
2302"CONFIGURATION FILE" section of <a href="git-config.html">git-config(1)</a>. By
2303default, colors are shown only when enabled for log output
2304(by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and respecting
2305the <code>auto</code> settings of the former if we are going to a
2306terminal). <code>%C(auto,...)</code> is accepted as a historical
2307synonym for the default (e.g., <code>%C(auto,red)</code>). Specifying
2308<code>%C(always,...)</code> will show the colors even when color is
2309not otherwise enabled (though consider just using
2310<code>--color=always</code> to enable color for the whole output,
2311including this format and anything else git might color).
2312<code>auto</code> alone (i.e. <code>%C(auto)</code>) will turn on auto coloring
2313on the next placeholders until the color is switched
2314again.</p>
2315</dd>
2316<dt class="hdlist1"><em>%m</em></dt>
2317<dd>
2318<p>left (<code>&lt;</code>), right (<code>&gt;</code>) or boundary (<code>-</code>) mark</p>
2319</dd>
2320<dt class="hdlist1"><em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em></dt>
2321<dd>
2322<p>switch line wrapping, like the -w option of
2323<a href="git-shortlog.html">git-shortlog(1)</a>.</p>
2324</dd>
2325<dt class="hdlist1"><em>%&lt;( &lt;N&gt; [,trunc|ltrunc|mtrunc])</em></dt>
2326<dd>
2327<p>make the next placeholder take at
2328least N column widths, padding spaces on
2329the right if necessary. Optionally
2330truncate (with ellipsis <em>..</em>) at the left (ltrunc) <code>..ft</code>,
2331the middle (mtrunc) <code>mi..le</code>, or the end
2332(trunc) <code>rig..</code>, if the output is longer than
2333N columns.
2334Note 1: that truncating
2335only works correctly with N &gt;= 2.
2336Note 2: spaces around the N and M (see below)
2337values are optional.
2338Note 3: Emojis and other wide characters
2339will take two display columns, which may
2340over-run column boundaries.
2341Note 4: decomposed character combining marks
2342may be misplaced at padding boundaries.</p>
2343</dd>
2344<dt class="hdlist1"><em>%&lt;|( &lt;M&gt; )</em></dt>
2345<dd>
2346<p>make the next placeholder take at least until Mth
2347display column, padding spaces on the right if necessary.
2348Use negative M values for column positions measured
2349from the right hand edge of the terminal window.</p>
2350</dd>
2351<dt class="hdlist1"><em>%&gt;( &lt;N&gt; )</em>, <em>%&gt;|( &lt;M&gt; )</em></dt>
2352<dd>
2353<p>similar to <em>%&lt;( &lt;N&gt; )</em>, <em>%&lt;|( &lt;M&gt; )</em> respectively,
2354but padding spaces on the left</p>
2355</dd>
2356<dt class="hdlist1"><em>%&gt;&gt;( &lt;N&gt; )</em>, <em>%&gt;&gt;|( &lt;M&gt; )</em></dt>
2357<dd>
2358<p>similar to <em>%&gt;( &lt;N&gt; )</em>, <em>%&gt;|( &lt;M&gt; )</em>
2359respectively, except that if the next
2360placeholder takes more spaces than given and
2361there are spaces on its left, use those
2362spaces</p>
2363</dd>
2364<dt class="hdlist1"><em>%&gt;&lt;( &lt;N&gt; )</em>, <em>%&gt;&lt;|( &lt;M&gt; )</em></dt>
2365<dd>
2366<p>similar to <em>%&lt;( &lt;N&gt; )</em>, <em>%&lt;|( &lt;M&gt; )</em>
2367respectively, but padding both sides
2368(i.e. the text is centered)</p>
2369</dd>
2370</dl>
2371</div>
2372</li>
2373<li>
2374<p>Placeholders that expand to information extracted from the commit:</p>
2375<div class="dlist">
2376<dl>
2377<dt class="hdlist1"><em>%H</em></dt>
2378<dd>
2379<p>commit hash</p>
2380</dd>
2381<dt class="hdlist1"><em>%h</em></dt>
2382<dd>
2383<p>abbreviated commit hash</p>
2384</dd>
2385<dt class="hdlist1"><em>%T</em></dt>
2386<dd>
2387<p>tree hash</p>
2388</dd>
2389<dt class="hdlist1"><em>%t</em></dt>
2390<dd>
2391<p>abbreviated tree hash</p>
2392</dd>
2393<dt class="hdlist1"><em>%P</em></dt>
2394<dd>
2395<p>parent hashes</p>
2396</dd>
2397<dt class="hdlist1"><em>%p</em></dt>
2398<dd>
2399<p>abbreviated parent hashes</p>
2400</dd>
2401<dt class="hdlist1"><em>%an</em></dt>
2402<dd>
2403<p>author name</p>
2404</dd>
2405<dt class="hdlist1"><em>%aN</em></dt>
2406<dd>
2407<p>author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2408or <a href="git-blame.html">git-blame(1)</a>)</p>
2409</dd>
2410<dt class="hdlist1"><em>%ae</em></dt>
2411<dd>
2412<p>author email</p>
2413</dd>
2414<dt class="hdlist1"><em>%aE</em></dt>
2415<dd>
2416<p>author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2417or <a href="git-blame.html">git-blame(1)</a>)</p>
2418</dd>
2419<dt class="hdlist1"><em>%al</em></dt>
2420<dd>
2421<p>author email local-part (the part before the <em>@</em> sign)</p>
2422</dd>
2423<dt class="hdlist1"><em>%aL</em></dt>
2424<dd>
2425<p>author local-part (see <em>%al</em>) respecting .mailmap, see
2426<a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2427</dd>
2428<dt class="hdlist1"><em>%ad</em></dt>
2429<dd>
2430<p>author date (format respects --date= option)</p>
2431</dd>
2432<dt class="hdlist1"><em>%aD</em></dt>
2433<dd>
2434<p>author date, RFC2822 style</p>
2435</dd>
2436<dt class="hdlist1"><em>%ar</em></dt>
2437<dd>
2438<p>author date, relative</p>
2439</dd>
2440<dt class="hdlist1"><em>%at</em></dt>
2441<dd>
2442<p>author date, UNIX timestamp</p>
2443</dd>
2444<dt class="hdlist1"><em>%ai</em></dt>
2445<dd>
2446<p>author date, ISO 8601-like format</p>
2447</dd>
2448<dt class="hdlist1"><em>%aI</em></dt>
2449<dd>
2450<p>author date, strict ISO 8601 format</p>
2451</dd>
2452<dt class="hdlist1"><em>%as</em></dt>
2453<dd>
2454<p>author date, short format (<code>YYYY-MM-DD</code>)</p>
2455</dd>
2456<dt class="hdlist1"><em>%ah</em></dt>
2457<dd>
2458<p>author date, human style (like the <code>--date=human</code> option of
2459<a href="git-rev-list.html">git-rev-list(1)</a>)</p>
2460</dd>
2461<dt class="hdlist1"><em>%cn</em></dt>
2462<dd>
2463<p>committer name</p>
2464</dd>
2465<dt class="hdlist1"><em>%cN</em></dt>
2466<dd>
2467<p>committer name (respecting .mailmap, see
2468<a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2469</dd>
2470<dt class="hdlist1"><em>%ce</em></dt>
2471<dd>
2472<p>committer email</p>
2473</dd>
2474<dt class="hdlist1"><em>%cE</em></dt>
2475<dd>
2476<p>committer email (respecting .mailmap, see
2477<a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2478</dd>
2479<dt class="hdlist1"><em>%cl</em></dt>
2480<dd>
2481<p>committer email local-part (the part before the <em>@</em> sign)</p>
2482</dd>
2483<dt class="hdlist1"><em>%cL</em></dt>
2484<dd>
2485<p>committer local-part (see <em>%cl</em>) respecting .mailmap, see
2486<a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2487</dd>
2488<dt class="hdlist1"><em>%cd</em></dt>
2489<dd>
2490<p>committer date (format respects --date= option)</p>
2491</dd>
2492<dt class="hdlist1"><em>%cD</em></dt>
2493<dd>
2494<p>committer date, RFC2822 style</p>
2495</dd>
2496<dt class="hdlist1"><em>%cr</em></dt>
2497<dd>
2498<p>committer date, relative</p>
2499</dd>
2500<dt class="hdlist1"><em>%ct</em></dt>
2501<dd>
2502<p>committer date, UNIX timestamp</p>
2503</dd>
2504<dt class="hdlist1"><em>%ci</em></dt>
2505<dd>
2506<p>committer date, ISO 8601-like format</p>
2507</dd>
2508<dt class="hdlist1"><em>%cI</em></dt>
2509<dd>
2510<p>committer date, strict ISO 8601 format</p>
2511</dd>
2512<dt class="hdlist1"><em>%cs</em></dt>
2513<dd>
2514<p>committer date, short format (<code>YYYY-MM-DD</code>)</p>
2515</dd>
2516<dt class="hdlist1"><em>%ch</em></dt>
2517<dd>
2518<p>committer date, human style (like the <code>--date=human</code> option of
2519<a href="git-rev-list.html">git-rev-list(1)</a>)</p>
2520</dd>
2521<dt class="hdlist1"><em>%d</em></dt>
2522<dd>
2523<p>ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a></p>
2524</dd>
2525<dt class="hdlist1"><em>%D</em></dt>
2526<dd>
2527<p>ref names without the " (", ")" wrapping.</p>
2528</dd>
2529<dt class="hdlist1"><em>%(decorate[:&lt;options&gt;])</em></dt>
2530<dd>
2531<p>ref names with custom decorations. The <code>decorate</code> string may be followed by a
2532colon and zero or more comma-separated options. Option values may contain
2533literal formatting codes. These must be used for commas (<code>%x2C</code>) and closing
2534parentheses (<code>%x29</code>), due to their role in the option syntax.</p>
2535<div class="ulist">
2536<ul>
2537<li>
2538<p><em>prefix=&lt;value&gt;</em>: Shown before the list of ref names. Defaults to "&#160;<code>(</code>".</p>
2539</li>
2540<li>
2541<p><em>suffix=&lt;value&gt;</em>: Shown after the list of ref names. Defaults to "<code>)</code>".</p>
2542</li>
2543<li>
2544<p><em>separator=&lt;value&gt;</em>: Shown between ref names. Defaults to "<code>,</code>&#160;".</p>
2545</li>
2546<li>
2547<p><em>pointer=&lt;value&gt;</em>: Shown between HEAD and the branch it points to, if any.
2548Defaults to "&#160;<code>-&gt;</code>&#160;".</p>
2549</li>
2550<li>
2551<p><em>tag=&lt;value&gt;</em>: Shown before tag names. Defaults to "<code>tag:</code>&#160;".</p>
2552</li>
2553</ul>
2554</div>
2555</dd>
2556</dl>
2557</div>
2558</li>
2559</ul>
2560</div>
2561<div class="paragraph">
2562<p>For example, to produce decorations with no wrapping
2563or tag annotations, and spaces as separators:</p>
2564</div>
2565<div class="paragraph">
2566<p>+
2567<code>%(decorate:prefix=,suffix=,tag=,separator= )</code></p>
2568</div>
2569<div class="dlist">
2570<dl>
2571<dt class="hdlist1"><em>%(describe[:&lt;options&gt;])</em></dt>
2572<dd>
2573<p>human-readable name, like <a href="git-describe.html">git-describe(1)</a>; empty string for
2574undescribable commits. The <code>describe</code> string may be followed by a colon and
2575zero or more comma-separated options. Descriptions can be inconsistent when
2576tags are added or removed at the same time.</p>
2577<div class="ulist">
2578<ul>
2579<li>
2580<p><em>tags[=&lt;bool-value&gt;]</em>: Instead of only considering annotated tags,
2581consider lightweight tags as well.</p>
2582</li>
2583<li>
2584<p><em>abbrev=&lt;number&gt;</em>: Instead of using the default number of hexadecimal digits
2585(which will vary according to the number of objects in the repository with a
2586default of 7) of the abbreviated object name, use &lt;number&gt; digits, or as many
2587digits as needed to form a unique object name.</p>
2588</li>
2589<li>
2590<p><em>match=&lt;pattern&gt;</em>: Only consider tags matching the given
2591<code>glob(7)</code> pattern, excluding the "refs/tags/" prefix.</p>
2592</li>
2593<li>
2594<p><em>exclude=&lt;pattern&gt;</em>: Do not consider tags matching the given
2595<code>glob(7)</code> pattern, excluding the "refs/tags/" prefix.</p>
2596</li>
2597</ul>
2598</div>
2599</dd>
2600<dt class="hdlist1"><em>%S</em></dt>
2601<dd>
2602<p>ref name given on the command line by which the commit was reached
2603(like <code>git log --source</code>), only works with <code>git log</code></p>
2604</dd>
2605<dt class="hdlist1"><em>%e</em></dt>
2606<dd>
2607<p>encoding</p>
2608</dd>
2609<dt class="hdlist1"><em>%s</em></dt>
2610<dd>
2611<p>subject</p>
2612</dd>
2613<dt class="hdlist1"><em>%f</em></dt>
2614<dd>
2615<p>sanitized subject line, suitable for a filename</p>
2616</dd>
2617<dt class="hdlist1"><em>%b</em></dt>
2618<dd>
2619<p>body</p>
2620</dd>
2621<dt class="hdlist1"><em>%B</em></dt>
2622<dd>
2623<p>raw body (unwrapped subject and body)</p>
2624</dd>
2625<dt class="hdlist1"><em>%GG</em></dt>
2626<dd>
2627<p>raw verification message from GPG for a signed commit</p>
2628</dd>
2629<dt class="hdlist1"><em>%G?</em></dt>
2630<dd>
2631<p>show "G" for a good (valid) signature,
2632"B" for a bad signature,
2633"U" for a good signature with unknown validity,
2634"X" for a good signature that has expired,
2635"Y" for a good signature made by an expired key,
2636"R" for a good signature made by a revoked key,
2637"E" if the signature cannot be checked (e.g. missing key)
2638and "N" for no signature</p>
2639</dd>
2640<dt class="hdlist1"><em>%GS</em></dt>
2641<dd>
2642<p>show the name of the signer for a signed commit</p>
2643</dd>
2644<dt class="hdlist1"><em>%GK</em></dt>
2645<dd>
2646<p>show the key used to sign a signed commit</p>
2647</dd>
2648<dt class="hdlist1"><em>%GF</em></dt>
2649<dd>
2650<p>show the fingerprint of the key used to sign a signed commit</p>
2651</dd>
2652<dt class="hdlist1"><em>%GP</em></dt>
2653<dd>
2654<p>show the fingerprint of the primary key whose subkey was used
2655to sign a signed commit</p>
2656</dd>
2657<dt class="hdlist1"><em>%GT</em></dt>
2658<dd>
2659<p>show the trust level for the key used to sign a signed commit</p>
2660</dd>
2661<dt class="hdlist1"><em>%gD</em></dt>
2662<dd>
2663<p>reflog selector, e.g., <code>refs/stash@{1}</code> or <code>refs/stash@{2
2664minutes ago}</code>; the format follows the rules described for the
2665<code>-g</code> option. The portion before the <code>@</code> is the refname as
2666given on the command line (so <code>git log -g refs/heads/master</code>
2667would yield <code>refs/heads/master@{0}</code>).</p>
2668</dd>
2669<dt class="hdlist1"><em>%gd</em></dt>
2670<dd>
2671<p>shortened reflog selector; same as <code>%gD</code>, but the refname
2672portion is shortened for human readability (so
2673<code>refs/heads/master</code> becomes just <code>master</code>).</p>
2674</dd>
2675<dt class="hdlist1"><em>%gn</em></dt>
2676<dd>
2677<p>reflog identity name</p>
2678</dd>
2679<dt class="hdlist1"><em>%gN</em></dt>
2680<dd>
2681<p>reflog identity name (respecting .mailmap, see
2682<a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2683</dd>
2684<dt class="hdlist1"><em>%ge</em></dt>
2685<dd>
2686<p>reflog identity email</p>
2687</dd>
2688<dt class="hdlist1"><em>%gE</em></dt>
2689<dd>
2690<p>reflog identity email (respecting .mailmap, see
2691<a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2692</dd>
2693<dt class="hdlist1"><em>%gs</em></dt>
2694<dd>
2695<p>reflog subject</p>
2696</dd>
2697<dt class="hdlist1"><em>%(trailers[:&lt;options&gt;])</em></dt>
2698<dd>
2699<p>display the trailers of the body as interpreted by
2700<a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>. The <code>trailers</code> string may be followed by
2701a colon and zero or more comma-separated options. If any option is provided
2702multiple times, the last occurrence wins.</p>
2703<div class="ulist">
2704<ul>
2705<li>
2706<p><em>key=&lt;key&gt;</em>: only show trailers with specified &lt;key&gt;. Matching is done
2707case-insensitively and trailing colon is optional. If option is
2708given multiple times trailer lines matching any of the keys are
2709shown. This option automatically enables the <code>only</code> option so that
2710non-trailer lines in the trailer block are hidden. If that is not
2711desired it can be disabled with <code>only=false</code>. E.g.,
2712<code>%(trailers:key=Reviewed-by)</code> shows trailer lines with key
2713<code>Reviewed-by</code>.</p>
2714</li>
2715<li>
2716<p><em>only[=&lt;bool&gt;]</em>: select whether non-trailer lines from the trailer
2717block should be included.</p>
2718</li>
2719<li>
2720<p><em>separator=&lt;sep&gt;</em>: specify the separator inserted between trailer
2721lines. Defaults to a line feed character. The string &lt;sep&gt; may contain
2722the literal formatting codes described above. To use comma as
2723separator one must use <code>%x2C</code> as it would otherwise be parsed as
2724next option. E.g., <code>%(trailers:key=Ticket,separator=%x2C )</code>
2725shows all trailer lines whose key is "Ticket" separated by a comma
2726and a space.</p>
2727</li>
2728<li>
2729<p><em>unfold[=&lt;bool&gt;]</em>: make it behave as if interpret-trailer&#8217;s <code>--unfold</code>
2730option was given. E.g.,
2731<code>%(trailers:only,unfold=true)</code> unfolds and shows all trailer lines.</p>
2732</li>
2733<li>
2734<p><em>keyonly[=&lt;bool&gt;]</em>: only show the key part of the trailer.</p>
2735</li>
2736<li>
2737<p><em>valueonly[=&lt;bool&gt;]</em>: only show the value part of the trailer.</p>
2738</li>
2739<li>
2740<p><em>key_value_separator=&lt;sep&gt;</em>: specify the separator inserted between
2741the key and value of each trailer. Defaults to ": ". Otherwise it
2742shares the same semantics as <em>separator=&lt;sep&gt;</em> above.</p>
2743</li>
2744</ul>
2745</div>
2746</dd>
2747</dl>
2748</div>
2749</li>
2750</ul>
2751</div>
2752<div class="admonitionblock note">
2753<table>
2754<tr>
2755<td class="icon">
2756<div class="title">Note</div>
2757</td>
2758<td class="content">
2759Some placeholders may depend on other options given to the
2760revision traversal engine. For example, the <code>%g*</code> reflog options will
2761insert an empty string unless we are traversing reflog entries (e.g., by
2762<code>git log -g</code>). The <code>%d</code> and <code>%D</code> placeholders will use the "short"
2763decoration format if <code>--decorate</code> was not already provided on the command
2764line.
2765</td>
2766</tr>
2767</table>
2768</div>
2769<div class="paragraph">
2770<p>The boolean options accept an optional value <code>[=&lt;bool-value&gt;]</code>. The values
2771<code>true</code>, <code>false</code>, <code>on</code>, <code>off</code> etc. are all accepted. See the "boolean"
2772sub-section in "EXAMPLES" in <a href="git-config.html">git-config(1)</a>. If a boolean
2773option is given with no value, it&#8217;s enabled.</p>
2774</div>
2775<div class="paragraph">
2776<p>If you add a <code>+</code> (plus sign) after <em>%</em> of a placeholder, a line-feed
2777is inserted immediately before the expansion if and only if the
2778placeholder expands to a non-empty string.</p>
2779</div>
2780<div class="paragraph">
2781<p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, all consecutive
2782line-feeds immediately preceding the expansion are deleted if and only if the
2783placeholder expands to an empty string.</p>
2784</div>
2785<div class="paragraph">
2786<p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
2787is inserted immediately before the expansion if and only if the
2788placeholder expands to a non-empty string.</p>
2789</div>
2790<div class="ulist">
2791<ul>
2792<li>
2793<p><em>tformat:</em></p>
2794<div class="paragraph">
2795<p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
2796provides "terminator" semantics instead of "separator" semantics. In
2797other words, each commit has the message terminator character (usually a
2798newline) appended, rather than a separator placed between entries.
2799This means that the final entry of a single-line format will be properly
2800terminated with a new line, just as the "oneline" format does.
2801For example:</p>
2802</div>
2803<div class="listingblock">
2804<div class="content">
2805<pre>$ git log -2 --pretty=format:%h 4da45bef \
2806 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
28074da45be
28087134973 -- NO NEWLINE
2809
2810$ git log -2 --pretty=tformat:%h 4da45bef \
2811 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
28124da45be
28137134973</pre>
2814</div>
2815</div>
2816<div class="paragraph">
2817<p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
2818as if it has <code>tformat:</code> in front of it. For example, these two are
2819equivalent:</p>
2820</div>
2821<div class="listingblock">
2822<div class="content">
2823<pre>$ git log -2 --pretty=tformat:%h 4da45bef
2824$ git log -2 --pretty=%h 4da45bef</pre>
2825</div>
2826</div>
2827</li>
2828</ul>
2829</div>
2830</div>
2831</div>
2832<div class="sect1">
2833<h2 id="_examples">EXAMPLES</h2>
2834<div class="sectionbody">
2835<div class="ulist">
2836<ul>
2837<li>
2838<p>Print the list of commits reachable from the current branch.</p>
2839<div class="listingblock">
2840<div class="content">
2841<pre>git rev-list HEAD</pre>
2842</div>
2843</div>
2844</li>
2845<li>
2846<p>Print the list of commits on this branch, but not present in the
2847upstream branch.</p>
2848<div class="listingblock">
2849<div class="content">
2850<pre>git rev-list @{upstream}..HEAD</pre>
2851</div>
2852</div>
2853</li>
2854<li>
2855<p>Format commits with their author and commit message (see also the
2856porcelain <a href="git-log.html">git-log(1)</a>).</p>
2857<div class="listingblock">
2858<div class="content">
2859<pre>git rev-list --format=medium HEAD</pre>
2860</div>
2861</div>
2862</li>
2863<li>
2864<p>Format commits along with their diffs (see also the porcelain
2865<a href="git-log.html">git-log(1)</a>, which can do this in a single process).</p>
2866<div class="listingblock">
2867<div class="content">
2868<pre>git rev-list HEAD |
2869git diff-tree --stdin --format=medium -p</pre>
2870</div>
2871</div>
2872</li>
2873<li>
2874<p>Print the list of commits on the current branch that touched any
2875file in the <code>Documentation</code> directory.</p>
2876<div class="listingblock">
2877<div class="content">
2878<pre>git rev-list HEAD -- Documentation/</pre>
2879</div>
2880</div>
2881</li>
2882<li>
2883<p>Print the list of commits authored by you in the past year, on
2884any branch, tag, or other ref.</p>
2885<div class="listingblock">
2886<div class="content">
2887<pre>git rev-list --author=you@example.com --since=1.year.ago --all</pre>
2888</div>
2889</div>
2890</li>
2891<li>
2892<p>Print the list of objects reachable from the current branch (i.e., all
2893commits and the blobs and trees they contain).</p>
2894<div class="listingblock">
2895<div class="content">
2896<pre>git rev-list --objects HEAD</pre>
2897</div>
2898</div>
2899</li>
2900<li>
2901<p>Compare the disk size of all reachable objects, versus those
2902reachable from reflogs, versus the total packed size. This can tell
2903you whether running <code>git repack -ad</code> might reduce the repository size
2904(by dropping unreachable objects), and whether expiring reflogs might
2905help.</p>
2906<div class="listingblock">
2907<div class="content">
2908<pre># reachable objects
2909git rev-list --disk-usage --objects --all
2910# plus reflogs
2911git rev-list --disk-usage --objects --all --reflog
2912# total disk size used
2913du -c .git/objects/pack/*.pack .git/objects/??/*
2914# alternative to du: add up "size" and "size-pack" fields
2915git count-objects -v</pre>
2916</div>
2917</div>
2918</li>
2919<li>
2920<p>Report the disk size of each branch, not including objects used by the
2921current branch. This can find outliers that are contributing to a
2922bloated repository size (e.g., because somebody accidentally committed
2923large build artifacts).</p>
2924<div class="listingblock">
2925<div class="content">
2926<pre>git for-each-ref --format='%(refname)' |
2927while read branch
2928do
2929 size=$(git rev-list --disk-usage --objects HEAD..$branch)
2930 echo "$size $branch"
2931done |
2932sort -n</pre>
2933</div>
2934</div>
2935</li>
2936<li>
2937<p>Compare the on-disk size of branches in one group of refs, excluding
2938another. If you co-mingle objects from multiple remotes in a single
2939repository, this can show which remotes are contributing to the
2940repository size (taking the size of <code>origin</code> as a baseline).</p>
2941<div class="listingblock">
2942<div class="content">
2943<pre>git rev-list --disk-usage --objects --remotes=$suspect --not --remotes=origin</pre>
2944</div>
2945</div>
2946</li>
2947</ul>
2948</div>
2949</div>
2950</div>
2951<div class="sect1">
2952<h2 id="_git">GIT</h2>
2953<div class="sectionbody">
2954<div class="paragraph">
2955<p>Part of the <a href="git.html">git(1)</a> suite</p>
2956</div>
2957</div>
2958</div>
2959</div>
2960<div id="footer">
2961<div id="footer-text">
2962Last updated 2023-10-23 14:43:46 -0700
2963</div>
2964</div>
2965</body>
2966</html>