Autogenerated HTML docs for v2.48.0-rc0
[git-htmldocs.git] / git-log.html
blobb67b1a769ea835f125b7b014fd6cb845d02c5c9c
1 <!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-log(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"; */
14 html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15 a{background:none}
16 a:focus{outline:thin dotted}
17 a:active,a:hover{outline:0}
18 h1{font-size:2em;margin:.67em 0}
19 b,strong{font-weight:bold}
20 abbr{font-size:.9em}
21 abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22 dfn{font-style:italic}
23 hr{height:0}
24 mark{background:#ff0;color:#000}
25 code,kbd,pre,samp{font-family:monospace;font-size:1em}
26 pre{white-space:pre-wrap}
27 q{quotes:"\201C" "\201D" "\2018" "\2019"}
28 small{font-size:80%}
29 sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30 sup{top:-.5em}
31 sub{bottom:-.25em}
32 img{border:0}
33 svg:not(:root){overflow:hidden}
34 figure{margin:0}
35 audio,video{display:inline-block}
36 audio:not([controls]){display:none;height:0}
37 fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38 legend{border:0;padding:0}
39 button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40 button,input{line-height:normal}
41 button,select{text-transform:none}
42 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43 button[disabled],html input[disabled]{cursor:default}
44 input[type=checkbox],input[type=radio]{padding:0}
45 button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46 textarea{overflow:auto;vertical-align:top}
47 table{border-collapse:collapse;border-spacing:0}
48 *,::before,::after{box-sizing:border-box}
49 html,body{font-size:100%}
50 body{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}
51 a:hover{cursor:pointer}
52 img,object,embed{max-width:100%;height:auto}
53 object,embed{height:100%}
54 img{-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}
62 img,object,svg{display:inline-block;vertical-align:middle}
63 textarea{height:auto;min-height:50px}
64 select{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}
66 div,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}
67 a{color:#2156a5;text-decoration:underline;line-height:inherit}
68 a:hover,a:focus{color:#1d4b8f}
69 a img{border:0}
70 p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71 p aside{font-size:.875em;line-height:1.35;font-style:italic}
72 h1,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}
73 h1 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}
74 h1{font-size:2.125em}
75 h2{font-size:1.6875em}
76 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77 h4,h5{font-size:1.125em}
78 h6{font-size:1em}
79 hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80 em,i{font-style:italic;line-height:inherit}
81 strong,b{font-weight:bold;line-height:inherit}
82 small{font-size:60%;line-height:inherit}
83 code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84 ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85 ul,ol{margin-left:1.5em}
86 ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87 ul.circle{list-style-type:circle}
88 ul.disc{list-style-type:disc}
89 ul.square{list-style-type:square}
90 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91 ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92 dl dt{margin-bottom:.3125em;font-weight:bold}
93 dl dd{margin-bottom:1.25em}
94 blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95 blockquote,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}
97 h1{font-size:2.75em}
98 h2{font-size:2.3125em}
99 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100 h4{font-size:1.4375em}}
101 table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102 table thead,table tfoot{background:#f7f8f7}
103 table 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}
104 table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105 table tr.even,table tr.alt{background:#f8f8f7}
106 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108 h1 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}
117 pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119 pre>code{display:block}
120 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121 em em{font-style:normal}
122 strong strong{font-weight:400}
123 .keyseq{color:rgba(51,51,51,.8)}
124 kbd{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}
132 b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133 b.button::before{content:"[";padding:0 3px 0 2px}
134 b.button::after{content:"]";padding:0 2px 0 3px}
135 p 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}
164 body.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}
170 body.toc2.toc-right{padding-left:0;padding-right:15em}
171 body.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}
177 body.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}
194 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
195 details{margin-left:1.25rem}
196 details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197 details>summary::-webkit-details-marker{display:none}
198 details>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%)}
199 details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
200 details>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}
202 table.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}
229 pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
230 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
231 pre.prettyprint li code[data-lang]::before{opacity:1}
232 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233 table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
234 table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
235 table.linenotable td.code{padding-left:.75em}
236 table.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}
237 pre.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}
260 p.tableblock:last-child{margin-bottom:0}
261 td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
262 td.tableblock>.content>:last-child{margin-bottom:-1.25em}
263 table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
264 table.grid-all>*>tr>*{border-width:1px}
265 table.grid-cols>*>tr>*{border-width:0 1px}
266 table.grid-rows>*>tr>*{border-width:1px 0}
267 table.frame-all{border-width:1px}
268 table.frame-ends{border-width:1px 0}
269 table.frame-sides{border-width:0 1px}
270 table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
271 table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
272 table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
273 table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
274 table.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}
275 th.halign-left,td.halign-left{text-align:left}
276 th.halign-right,td.halign-right{text-align:right}
277 th.halign-center,td.halign-center{text-align:center}
278 th.valign-top,td.valign-top{vertical-align:top}
279 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280 th.valign-middle,td.valign-middle{vertical-align:middle}
281 table thead th,table tfoot th{font-weight:bold}
282 tbody tr th{background:#f7f8f7}
283 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
284 p.tableblock>code:only-child{background:none;padding:0}
285 p.tableblock{font-size:1em}
286 ol{margin-left:1.75em}
287 ul li ol{margin-left:1.5em}
288 dl dd{margin-left:1.125em}
289 dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
290 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
291 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
293 ul.unstyled,ol.unstyled{margin-left:0}
294 li>p:empty:only-child::before{content:"";display:inline-block}
295 ul.checklist>li>p:first-child{margin-left:-1em}
296 ul.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}
297 ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
298 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
299 ul.inline>li{margin-left:1.25em}
300 .unstyled dl dt{font-weight:400;font-style:normal}
301 ol.arabic{list-style-type:decimal}
302 ol.decimal{list-style-type:decimal-leading-zero}
303 ol.loweralpha{list-style-type:lower-alpha}
304 ol.upperalpha{list-style-type:upper-alpha}
305 ol.lowerroman{list-style-type:lower-roman}
306 ol.upperroman{list-style-type:upper-roman}
307 ol.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}
310 td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
311 td.hdlist1{font-weight:bold;padding-bottom:1.25em}
312 td.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}
326 a.image{text-decoration:none;display:inline-block}
327 a.image object{pointer-events:none}
328 sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
329 sup.footnote a,sup.footnoteref a{text-decoration:none}
330 sup.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}
337 div.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}
375 span.icon>.fa{cursor:default}
376 a 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)}
387 pre .conum[data-value]{position:relative;top:-.125em}
388 b.conum *{color:inherit!important}
389 .conum:not([data-value]):empty{display:none}
390 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391 h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
392 p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
393 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
394 p{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}
400 html{font-size:80%}
401 a{color:inherit!important;text-decoration:underline!important}
402 a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
403 a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
404 abbr[title]{border-bottom:1px dotted}
405 abbr[title]::after{content:" (" attr(title) ")"}
406 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407 thead{display:table-header-group}
408 svg{max-width:100%}
409 p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
410 h2,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}
414 body.book #header{text-align:center}
415 body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
416 body.book #header .details{border:0!important;display:block;padding:0!important}
417 body.book #header .details span:first-child{margin-left:0!important}
418 body.book #header .details br{display:block}
419 body.book #header .details br+span::before{content:none!important}
420 body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
421 body.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>
436 pre>code {
437 display: inline;
439 </style>
440 </head>
441 <body class="manpage">
442 <div id="header">
443 <h1>git-log(1) Manual Page</h1>
444 <h2 id="_name">NAME</h2>
445 <div class="sectionbody">
446 <p>git-log - Show commit logs</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 log</em> [&lt;options&gt;] [&lt;revision-range&gt;] [[--] &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>Shows the commit logs.</p>
463 </div>
464 <div class="paragraph">
465 <p>List commits that are reachable by following the <code>parent</code> links from the
466 given commit(s), but exclude commits that are reachable from the one(s)
467 given with a <em>^</em> in front of them. The output is given in reverse
468 chronological order by default.</p>
469 </div>
470 <div class="paragraph">
471 <p>You can think of this as a set operation. Commits reachable from any of
472 the commits given on the command line form a set, and then commits reachable
473 from any of the ones given with <em>^</em> in front are subtracted from that
474 set. The remaining commits are what comes out in the command&#8217;s output.
475 Various other options and paths parameters can be used to further limit the
476 result.</p>
477 </div>
478 <div class="paragraph">
479 <p>Thus, the following command:</p>
480 </div>
481 <div class="listingblock">
482 <div class="content">
483 <pre>$ git log foo bar ^baz</pre>
484 </div>
485 </div>
486 <div class="paragraph">
487 <p>means "list all the commits which are reachable from <em>foo</em> or <em>bar</em>, but
488 not from <em>baz</em>".</p>
489 </div>
490 <div class="paragraph">
491 <p>A special notation "<em>&lt;commit1&gt;</em>..<em>&lt;commit2&gt;</em>" can be used as a
492 short-hand for "^<em>&lt;commit1&gt;</em> <em>&lt;commit2&gt;</em>". For example, either of
493 the following may be used interchangeably:</p>
494 </div>
495 <div class="listingblock">
496 <div class="content">
497 <pre>$ git log origin..HEAD
498 $ git log HEAD ^origin</pre>
499 </div>
500 </div>
501 <div class="paragraph">
502 <p>Another special notation is "<em>&lt;commit1&gt;</em>&#8230;&#8203;<em>&lt;commit2&gt;</em>" which is useful
503 for merges. The resulting set of commits is the symmetric difference
504 between the two operands. The following two commands are equivalent:</p>
505 </div>
506 <div class="listingblock">
507 <div class="content">
508 <pre>$ git log A B --not $(git merge-base --all A B)
509 $ git log A...B</pre>
510 </div>
511 </div>
512 <div class="paragraph">
513 <p>The command takes options applicable to the <a href="git-rev-list.html">git-rev-list(1)</a>
514 command to control what is shown and how, and options applicable to
515 the <a href="git-diff.html">git-diff(1)</a> command to control how the changes
516 each commit introduces are shown.</p>
517 </div>
518 </div>
519 </div>
520 <div class="sect1">
521 <h2 id="_options">OPTIONS</h2>
522 <div class="sectionbody">
523 <div class="dlist">
524 <dl>
525 <dt class="hdlist1">--follow</dt>
526 <dd>
527 <p>Continue listing the history of a file beyond renames
528 (works only for a single file).</p>
529 </dd>
530 <dt class="hdlist1">--no-decorate</dt>
531 <dt class="hdlist1">--decorate[=short|full|auto|no]</dt>
532 <dd>
533 <p>Print out the ref names of any commits that are shown. If <em>short</em> is
534 specified, the ref name prefixes <em>refs/heads/</em>, <em>refs/tags/</em> and
535 <em>refs/remotes/</em> will not be printed. If <em>full</em> is specified, the
536 full ref name (including prefix) will be printed. If <em>auto</em> is
537 specified, then if the output is going to a terminal, the ref names
538 are shown as if <em>short</em> were given, otherwise no ref names are
539 shown. The option <code>--decorate</code> is short-hand for <code>--decorate=short</code>.
540 Default to configuration value of <code>log.decorate</code> if configured,
541 otherwise, <code>auto</code>.</p>
542 </dd>
543 <dt class="hdlist1">--decorate-refs=&lt;pattern&gt;</dt>
544 <dt class="hdlist1">--decorate-refs-exclude=&lt;pattern&gt;</dt>
545 <dd>
546 <p>For each candidate reference, do not use it for decoration if it
547 matches any patterns given to <code>--decorate-refs-exclude</code> or if it
548 doesn&#8217;t match any of the patterns given to <code>--decorate-refs</code>. The
549 <code>log.excludeDecoration</code> config option allows excluding refs from
550 the decorations, but an explicit <code>--decorate-refs</code> pattern will
551 override a match in <code>log.excludeDecoration</code>.</p>
552 <div class="paragraph">
553 <p>If none of these options or config settings are given, then references are
554 used as decoration if they match <code>HEAD</code>, <code>refs/heads/</code>, <code>refs/remotes/</code>,
555 <code>refs/stash/</code>, or <code>refs/tags/</code>.</p>
556 </div>
557 </dd>
558 <dt class="hdlist1">--clear-decorations</dt>
559 <dd>
560 <p>When specified, this option clears all previous <code>--decorate-refs</code>
561 or <code>--decorate-refs-exclude</code> options and relaxes the default
562 decoration filter to include all references. This option is
563 assumed if the config value <code>log.initialDecorationSet</code> is set to
564 <code>all</code>.</p>
565 </dd>
566 <dt class="hdlist1">--source</dt>
567 <dd>
568 <p>Print out the ref name given on the command line by which each
569 commit was reached.</p>
570 </dd>
571 <dt class="hdlist1">--[no-]mailmap</dt>
572 <dt class="hdlist1">--[no-]use-mailmap</dt>
573 <dd>
574 <p>Use mailmap file to map author and committer names and email
575 addresses to canonical real names and email addresses. See
576 <a href="git-shortlog.html">git-shortlog(1)</a>.</p>
577 </dd>
578 <dt class="hdlist1">--full-diff</dt>
579 <dd>
580 <p>Without this flag, <code>git</code> <code>log</code> <code>-p</code> <em>&lt;path&gt;</em>... shows commits that
581 touch the specified paths, and diffs about the same specified
582 paths. With this, the full diff is shown for commits that touch
583 the specified paths; this means that "&lt;path&gt;&#8230;&#8203;" limits only
584 commits, and doesn&#8217;t limit diff for those commits.</p>
585 <div class="paragraph">
586 <p>Note that this affects all diff-based output types, e.g. those
587 produced by <code>--stat</code>, etc.</p>
588 </div>
589 </dd>
590 <dt class="hdlist1">--log-size</dt>
591 <dd>
592 <p>Include a line &#8220;log size &lt;number&gt;&#8221; in the output for each commit,
593 where &lt;number&gt; is the length of that commit&#8217;s message in bytes.
594 Intended to speed up tools that read log messages from <code>git</code> <code>log</code>
595 output by allowing them to allocate space in advance.</p>
596 </dd>
597 <dt class="hdlist1">-L&lt;start&gt;,&lt;end&gt;:&lt;file&gt;</dt>
598 <dt class="hdlist1">-L:&lt;funcname&gt;:&lt;file&gt;</dt>
599 <dd>
600 <p>Trace the evolution of the line range given by <em>&lt;start&gt;,&lt;end&gt;</em>,
601 or by the function name regex <em>&lt;funcname&gt;</em>, within the <em>&lt;file&gt;</em>. You may
602 not give any pathspec limiters. This is currently limited to
603 a walk starting from a single revision, i.e., you may only
604 give zero or one positive revision arguments, and
605 <em>&lt;start&gt;</em> and <em>&lt;end&gt;</em> (or <em>&lt;funcname&gt;</em>) must exist in the starting revision.
606 You can specify this option more than once. Implies <code>--patch</code>.
607 Patch output can be suppressed using <code>--no-patch</code>, but other diff formats
608 (namely <code>--raw</code>, <code>--numstat</code>, <code>--shortstat</code>, <code>--dirstat</code>, <code>--summary</code>,
609 <code>--name-only</code>, <code>--name-status</code>, <code>--check</code>) are not currently implemented.</p>
610 <div class="paragraph">
611 <p><em>&lt;start&gt;</em> and <em>&lt;end&gt;</em> can take one of these forms:</p>
612 </div>
613 <div class="ulist">
614 <ul>
615 <li>
616 <p>number</p>
617 <div class="paragraph">
618 <p>If <em>&lt;start&gt;</em> or <em>&lt;end&gt;</em> is a number, it specifies an
619 absolute line number (lines count from 1).</p>
620 </div>
621 </li>
622 <li>
623 <p><code>/regex/</code></p>
624 <div class="paragraph">
625 <p>This form will use the first line matching the given
626 POSIX regex. If <em>&lt;start&gt;</em> is a regex, it will search from the end of
627 the previous <code>-L</code> range, if any, otherwise from the start of file.
628 If <em>&lt;start&gt;</em> is <code>^/regex/</code>, it will search from the start of file.
629 If <em>&lt;end&gt;</em> is a regex, it will search
630 starting at the line given by <em>&lt;start&gt;</em>.</p>
631 </div>
632 </li>
633 <li>
634 <p>+offset or -offset</p>
635 <div class="paragraph">
636 <p>This is only valid for <em>&lt;end&gt;</em> and will specify a number
637 of lines before or after the line given by <em>&lt;start&gt;</em>.</p>
638 </div>
639 </li>
640 </ul>
641 </div>
642 <div class="paragraph">
643 <p>If <code>:</code><em>&lt;funcname&gt;</em> is given in place of <em>&lt;start&gt;</em> and <em>&lt;end&gt;</em>, it is a
644 regular expression that denotes the range from the first funcname line
645 that matches <em>&lt;funcname&gt;</em>, up to the next funcname line. <code>:</code><em>&lt;funcname&gt;</em>
646 searches from the end of the previous <code>-L</code> range, if any, otherwise
647 from the start of file. <code>^:</code><em>&lt;funcname&gt;</em> searches from the start of
648 file. The function names are determined in the same way as <code>git</code> <code>diff</code>
649 works out patch hunk headers (see <em>Defining a custom hunk-header</em>
650 in <a href="gitattributes.html">gitattributes(5)</a>).</p>
651 </div>
652 </dd>
653 <dt class="hdlist1">&lt;revision-range&gt;</dt>
654 <dd>
655 <p>Show only commits in the specified revision range. When no
656 &lt;revision-range&gt; is specified, it defaults to <code>HEAD</code> (i.e. the
657 whole history leading to the current commit). <code>origin</code><code>..</code><code>HEAD</code>
658 specifies all the commits reachable from the current commit
659 (i.e. <code>HEAD</code>), but not from <code>origin</code>. For a complete list of
660 ways to spell &lt;revision-range&gt;, see the <em>Specifying Ranges</em>
661 section of <a href="gitrevisions.html">gitrevisions(7)</a>.</p>
662 </dd>
663 <dt class="hdlist1">[--] &lt;path&gt;&#8230;&#8203;</dt>
664 <dd>
665 <p>Show only commits that are enough to explain how the files
666 that match the specified paths came to be. See <em>History
667 Simplification</em> below for details and other simplification
668 modes.</p>
669 <div class="paragraph">
670 <p>Paths may need to be prefixed with <code>--</code> to separate them from
671 options or the revision range, when confusion arises.</p>
672 </div>
673 </dd>
674 </dl>
675 </div>
676 <div class="sect2">
677 <h3 id="_commit_limiting">Commit Limiting</h3>
678 <div class="paragraph">
679 <p>Besides specifying a range of commits that should be listed using the
680 special notations explained in the description, additional commit
681 limiting may be applied.</p>
682 </div>
683 <div class="paragraph">
684 <p>Using more options generally further limits the output (e.g.
685 <code>--since=</code><em>&lt;date1&gt;</em> limits to commits newer than <em>&lt;date1&gt;</em>, and using it
686 with <code>--grep=</code><em>&lt;pattern&gt;</em> further limits to commits whose log message
687 has a line that matches <em>&lt;pattern&gt;</em>), unless otherwise noted.</p>
688 </div>
689 <div class="paragraph">
690 <p>Note that these are applied before commit
691 ordering and formatting options, such as <code>--reverse</code>.</p>
692 </div>
693 <div class="dlist">
694 <dl>
695 <dt class="hdlist1">-&lt;number&gt;</dt>
696 <dt class="hdlist1">-n &lt;number&gt;</dt>
697 <dt class="hdlist1">--max-count=&lt;number&gt;</dt>
698 <dd>
699 <p>Limit the number of commits to output.</p>
700 </dd>
701 <dt class="hdlist1">--skip=&lt;number&gt;</dt>
702 <dd>
703 <p>Skip <em>number</em> commits before starting to show the commit output.</p>
704 </dd>
705 <dt class="hdlist1">--since=&lt;date&gt;</dt>
706 <dt class="hdlist1">--after=&lt;date&gt;</dt>
707 <dd>
708 <p>Show commits more recent than a specific date.</p>
709 </dd>
710 <dt class="hdlist1">--since-as-filter=&lt;date&gt;</dt>
711 <dd>
712 <p>Show all commits more recent than a specific date. This visits
713 all commits in the range, rather than stopping at the first commit which
714 is older than a specific date.</p>
715 </dd>
716 <dt class="hdlist1">--until=&lt;date&gt;</dt>
717 <dt class="hdlist1">--before=&lt;date&gt;</dt>
718 <dd>
719 <p>Show commits older than a specific date.</p>
720 </dd>
721 <dt class="hdlist1">--author=&lt;pattern&gt;</dt>
722 <dt class="hdlist1">--committer=&lt;pattern&gt;</dt>
723 <dd>
724 <p>Limit the commits output to ones with author/committer
725 header lines that match the specified pattern (regular
726 expression). With more than one <code>--author=</code><em>&lt;pattern&gt;</em>,
727 commits whose author matches any of the given patterns are
728 chosen (similarly for multiple <code>--committer=</code><em>&lt;pattern&gt;</em>).</p>
729 </dd>
730 <dt class="hdlist1">--grep-reflog=&lt;pattern&gt;</dt>
731 <dd>
732 <p>Limit the commits output to ones with reflog entries that
733 match the specified pattern (regular expression). With
734 more than one <code>--grep-reflog</code>, commits whose reflog message
735 matches any of the given patterns are chosen. It is an
736 error to use this option unless <code>--walk-reflogs</code> is in use.</p>
737 </dd>
738 <dt class="hdlist1">--grep=&lt;pattern&gt;</dt>
739 <dd>
740 <p>Limit the commits output to ones with a log message that
741 matches the specified pattern (regular expression). With
742 more than one <code>--grep=</code><em>&lt;pattern&gt;</em>, commits whose message
743 matches any of the given patterns are chosen (but see
744 <code>--all-match</code>).</p>
745 <div class="paragraph">
746 <p>When <code>--notes</code> is in effect, the message from the notes is
747 matched as if it were part of the log message.</p>
748 </div>
749 </dd>
750 <dt class="hdlist1">--all-match</dt>
751 <dd>
752 <p>Limit the commits output to ones that match all given <code>--grep</code>,
753 instead of ones that match at least one.</p>
754 </dd>
755 <dt class="hdlist1">--invert-grep</dt>
756 <dd>
757 <p>Limit the commits output to ones with a log message that do not
758 match the pattern specified with <code>--grep=</code><em>&lt;pattern&gt;</em>.</p>
759 </dd>
760 <dt class="hdlist1">-i</dt>
761 <dt class="hdlist1">--regexp-ignore-case</dt>
762 <dd>
763 <p>Match the regular expression limiting patterns without regard to letter
764 case.</p>
765 </dd>
766 <dt class="hdlist1">--basic-regexp</dt>
767 <dd>
768 <p>Consider the limiting patterns to be basic regular expressions;
769 this is the default.</p>
770 </dd>
771 <dt class="hdlist1">-E</dt>
772 <dt class="hdlist1">--extended-regexp</dt>
773 <dd>
774 <p>Consider the limiting patterns to be extended regular expressions
775 instead of the default basic regular expressions.</p>
776 </dd>
777 <dt class="hdlist1">-F</dt>
778 <dt class="hdlist1">--fixed-strings</dt>
779 <dd>
780 <p>Consider the limiting patterns to be fixed strings (don&#8217;t interpret
781 pattern as a regular expression).</p>
782 </dd>
783 <dt class="hdlist1">-P</dt>
784 <dt class="hdlist1">--perl-regexp</dt>
785 <dd>
786 <p>Consider the limiting patterns to be Perl-compatible regular
787 expressions.</p>
788 <div class="paragraph">
789 <p>Support for these types of regular expressions is an optional
790 compile-time dependency. If Git wasn&#8217;t compiled with support for them
791 providing this option will cause it to die.</p>
792 </div>
793 </dd>
794 <dt class="hdlist1">--remove-empty</dt>
795 <dd>
796 <p>Stop when a given path disappears from the tree.</p>
797 </dd>
798 <dt class="hdlist1">--merges</dt>
799 <dd>
800 <p>Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.</p>
801 </dd>
802 <dt class="hdlist1">--no-merges</dt>
803 <dd>
804 <p>Do not print commits with more than one parent. This is
805 exactly the same as <code>--max-parents=1</code>.</p>
806 </dd>
807 <dt class="hdlist1">--min-parents=&lt;number&gt;</dt>
808 <dt class="hdlist1">--max-parents=&lt;number&gt;</dt>
809 <dt class="hdlist1">--no-min-parents</dt>
810 <dt class="hdlist1">--no-max-parents</dt>
811 <dd>
812 <p>Show only commits which have at least (or at most) that many parent
813 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
814 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
815 gives all root commits and <code>--min-parents=3</code> all octopus merges.</p>
816 <div class="paragraph">
817 <p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
818 again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
819 parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p>
820 </div>
821 </dd>
822 <dt class="hdlist1">--first-parent</dt>
823 <dd>
824 <p>When finding commits to include, follow only the first
825 parent commit upon seeing a merge commit. This option
826 can give a better overview when viewing the evolution of
827 a particular topic branch, because merges into a topic
828 branch tend to be only about adjusting to updated upstream
829 from time to time, and this option allows you to ignore
830 the individual commits brought in to your history by such
831 a merge.</p>
832 <div class="paragraph">
833 <p>This option also changes default diff format for merge commits
834 to <code>first-parent</code>, see <code>--diff-merges=first-parent</code> for details.</p>
835 </div>
836 </dd>
837 <dt class="hdlist1">--exclude-first-parent-only</dt>
838 <dd>
839 <p>When finding commits to exclude (with a <em>^</em>), follow only
840 the first parent commit upon seeing a merge commit.
841 This can be used to find the set of changes in a topic branch
842 from the point where it diverged from the remote branch, given
843 that arbitrary merges can be valid topic branch changes.</p>
844 </dd>
845 <dt class="hdlist1">--not</dt>
846 <dd>
847 <p>Reverses the meaning of the <em>^</em> prefix (or lack thereof)
848 for all following revision specifiers, up to the next <code>--not</code>.
849 When used on the command line before --stdin, the revisions passed
850 through stdin will not be affected by it. Conversely, when passed
851 via standard input, the revisions passed on the command line will
852 not be affected by it.</p>
853 </dd>
854 <dt class="hdlist1">--all</dt>
855 <dd>
856 <p>Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
857 listed on the command line as <em>&lt;commit&gt;</em>.</p>
858 </dd>
859 <dt class="hdlist1">--branches[=&lt;pattern&gt;]</dt>
860 <dd>
861 <p>Pretend as if all the refs in <code>refs/heads</code> are listed
862 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
863 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
864 <em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied.</p>
865 </dd>
866 <dt class="hdlist1">--tags[=&lt;pattern&gt;]</dt>
867 <dd>
868 <p>Pretend as if all the refs in <code>refs/tags</code> are listed
869 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
870 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>*</em>,
871 or <em>[</em>, <em>/*</em> at the end is implied.</p>
872 </dd>
873 <dt class="hdlist1">--remotes[=&lt;pattern&gt;]</dt>
874 <dd>
875 <p>Pretend as if all the refs in <code>refs/remotes</code> are listed
876 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
877 remote-tracking branches to ones matching given shell glob.
878 If pattern lacks <em>?</em>, <em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied.</p>
879 </dd>
880 <dt class="hdlist1">--glob=&lt;glob-pattern&gt;</dt>
881 <dd>
882 <p>Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
883 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
884 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>*</em>,
885 or <em>[</em>, <em>/*</em> at the end is implied.</p>
886 </dd>
887 <dt class="hdlist1">--exclude=&lt;glob-pattern&gt;</dt>
888 <dd>
889 <p>Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
890 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
891 consider. Repetitions of this option accumulate exclusion patterns
892 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
893 <code>--glob</code> option (other options or arguments do not clear
894 accumulated patterns).</p>
895 <div class="paragraph">
896 <p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
897 <code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
898 respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
899 or <code>--all</code>. If a trailing <em>/*</em> is intended, it must be given
900 explicitly.</p>
901 </div>
902 </dd>
903 <dt class="hdlist1">--exclude-hidden=[fetch|receive|uploadpack]</dt>
904 <dd>
905 <p>Do not include refs that would be hidden by <code>git-fetch</code>,
906 <code>git-receive-pack</code> or <code>git-upload-pack</code> by consulting the appropriate
907 <code>fetch.hideRefs</code>, <code>receive.hideRefs</code> or <code>uploadpack.hideRefs</code>
908 configuration along with <code>transfer.hideRefs</code> (see
909 <a href="git-config.html">git-config(1)</a>). This option affects the next pseudo-ref option
910 <code>--all</code> or <code>--glob</code> and is cleared after processing them.</p>
911 </dd>
912 <dt class="hdlist1">--reflog</dt>
913 <dd>
914 <p>Pretend as if all objects mentioned by reflogs are listed on the
915 command line as <em>&lt;commit&gt;</em>.</p>
916 </dd>
917 <dt class="hdlist1">--alternate-refs</dt>
918 <dd>
919 <p>Pretend as if all objects mentioned as ref tips of alternate
920 repositories were listed on the command line. An alternate
921 repository is any repository whose object directory is specified
922 in <code>objects/info/alternates</code>. The set of included objects may
923 be modified by <code>core.alternateRefsCommand</code>, etc. See
924 <a href="git-config.html">git-config(1)</a>.</p>
925 </dd>
926 <dt class="hdlist1">--single-worktree</dt>
927 <dd>
928 <p>By default, all working trees will be examined by the
929 following options when there are more than one (see
930 <a href="git-worktree.html">git-worktree(1)</a>): <code>--all</code>, <code>--reflog</code> and
931 <code>--indexed-objects</code>.
932 This option forces them to examine the current working tree
933 only.</p>
934 </dd>
935 <dt class="hdlist1">--ignore-missing</dt>
936 <dd>
937 <p>Upon seeing an invalid object name in the input, pretend as if
938 the bad input was not given.</p>
939 </dd>
940 <dt class="hdlist1">--bisect</dt>
941 <dd>
942 <p>Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
943 was listed and as if it was followed by <code>--not</code> and the good
944 bisection refs <code>refs/bisect/good-</code>* on the command
945 line.</p>
946 </dd>
947 <dt class="hdlist1">--stdin</dt>
948 <dd>
949 <p>In addition to getting arguments from the command line, read
950 them from standard input as well. This accepts commits and
951 pseudo-options like <code>--all</code> and <code>--glob=</code>. When a <code>--</code> separator
952 is seen, the following input is treated as paths and used to
953 limit the result. Flags like <code>--not</code> which are read via standard input
954 are only respected for arguments passed in the same way and will not
955 influence any subsequent command line arguments.</p>
956 </dd>
957 <dt class="hdlist1">--cherry-mark</dt>
958 <dd>
959 <p>Like <code>--cherry-pick</code> (see below) but mark equivalent commits
960 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.</p>
961 </dd>
962 <dt class="hdlist1">--cherry-pick</dt>
963 <dd>
964 <p>Omit any commit that introduces the same change as
965 another commit on the &#8220;other side&#8221; when the set of
966 commits are limited with symmetric difference.</p>
967 <div class="paragraph">
968 <p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way
969 to list all commits on only one side of them is with
970 <code>--left-right</code> (see the example below in the description of
971 the <code>--left-right</code> option). However, it shows the commits that were
972 cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
973 cherry-picked from branch A). With this option, such pairs of commits are
974 excluded from the output.</p>
975 </div>
976 </dd>
977 <dt class="hdlist1">--left-only</dt>
978 <dt class="hdlist1">--right-only</dt>
979 <dd>
980 <p>List only commits on the respective side of a symmetric difference,
981 i.e. only those which would be marked &lt; resp. &gt; by
982 <code>--left-right</code>.</p>
983 <div class="paragraph">
984 <p>For example, <code>--cherry-pick</code> <code>--right-only</code> <code>A</code><code>...</code><code>B</code> omits those
985 commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
986 <code>A</code>. In other words, this lists the <code>+</code> commits from <code>git</code> <code>cherry</code> <code>A</code> <code>B</code>.
987 More precisely, <code>--cherry-pick</code> <code>--right-only</code> <code>--no-merges</code> gives the exact
988 list.</p>
989 </div>
990 </dd>
991 <dt class="hdlist1">--cherry</dt>
992 <dd>
993 <p>A synonym for <code>--right-only</code> <code>--cherry-mark</code> <code>--no-merges</code>; useful to
994 limit the output to the commits on our side and mark those that
995 have been applied to the other side of a forked history with
996 <code>git</code> <code>log</code> <code>--cherry</code> <code>upstream</code><code>...</code><code>mybranch</code>, similar to
997 <code>git</code> <code>cherry</code> <code>upstream</code> <code>mybranch</code>.</p>
998 </dd>
999 <dt class="hdlist1">-g</dt>
1000 <dt class="hdlist1">--walk-reflogs</dt>
1001 <dd>
1002 <p>Instead of walking the commit ancestry chain, walk
1003 reflog entries from the most recent one to older ones.
1004 When this option is used you cannot specify commits to
1005 exclude (that is, <em>^commit</em>, <em>commit1..commit2</em>,
1006 and <em>commit1...commit2</em> notations cannot be used).</p>
1007 <div class="paragraph">
1008 <p>With <code>--pretty</code> format other than <code>oneline</code> and <code>reference</code> (for obvious reasons),
1009 this causes the output to have two extra lines of information
1010 taken from the reflog. The reflog designator in the output may be shown
1011 as <code>ref@</code>{<em>&lt;Nth&gt;</em>} (where <em>&lt;Nth&gt;</em> is the reverse-chronological index in the
1012 reflog) or as <code>ref@</code>{<em>&lt;timestamp&gt;</em>} (with the <em>&lt;timestamp&gt;</em> for that entry),
1013 depending on a few rules:</p>
1014 </div>
1015 <div class="openblock">
1016 <div class="content">
1017 <div class="olist arabic">
1018 <ol class="arabic">
1019 <li>
1020 <p>If the starting point is specified as <code>ref@</code>{<em>&lt;Nth&gt;</em>}, show the index
1021 format.</p>
1022 </li>
1023 <li>
1024 <p>If the starting point was specified as <code>ref@</code>{now}, show the
1025 timestamp format.</p>
1026 </li>
1027 <li>
1028 <p>If neither was used, but <code>--date</code> was given on the command line, show
1029 the timestamp in the format requested by <code>--date</code>.</p>
1030 </li>
1031 <li>
1032 <p>Otherwise, show the index format.</p>
1033 </li>
1034 </ol>
1035 </div>
1036 </div>
1037 </div>
1038 <div class="paragraph">
1039 <p>Under <code>--pretty=oneline</code>, the commit message is
1040 prefixed with this information on the same line.
1041 This option cannot be combined with <code>--reverse</code>.
1042 See also <a href="git-reflog.html">git-reflog(1)</a>.</p>
1043 </div>
1044 <div class="paragraph">
1045 <p>Under <code>--pretty=reference</code>, this information will not be shown at all.</p>
1046 </div>
1047 </dd>
1048 <dt class="hdlist1">--merge</dt>
1049 <dd>
1050 <p>Show commits touching conflicted paths in the range <code>HEAD</code><code>...</code><em>&lt;other&gt;</em>,
1051 where <em>&lt;other&gt;</em> is the first existing pseudoref in <code>MERGE_HEAD</code>,
1052 <code>CHERRY_PICK_HEAD</code>, <code>REVERT_HEAD</code> or <code>REBASE_HEAD</code>. Only works
1053 when the index has unmerged entries. This option can be used to show
1054 relevant commits when resolving conflicts from a 3-way merge.</p>
1055 </dd>
1056 <dt class="hdlist1">--boundary</dt>
1057 <dd>
1058 <p>Output excluded boundary commits. Boundary commits are
1059 prefixed with <code>-</code>.</p>
1060 </dd>
1061 </dl>
1062 </div>
1063 </div>
1064 <div class="sect2">
1065 <h3 id="_history_simplification">History Simplification</h3>
1066 <div class="paragraph">
1067 <p>Sometimes you are only interested in parts of the history, for example the
1068 commits modifying a particular &lt;path&gt;. But there are two parts of
1069 <em>History Simplification</em>, one part is selecting the commits and the other
1070 is how to do it, as there are various strategies to simplify the history.</p>
1071 </div>
1072 <div class="paragraph">
1073 <p>The following options select the commits to be shown:</p>
1074 </div>
1075 <div class="dlist">
1076 <dl>
1077 <dt class="hdlist1">&lt;paths&gt;</dt>
1078 <dd>
1079 <p>Commits modifying the given &lt;paths&gt; are selected.</p>
1080 </dd>
1081 <dt class="hdlist1">--simplify-by-decoration</dt>
1082 <dd>
1083 <p>Commits that are referred by some branch or tag are selected.</p>
1084 </dd>
1085 </dl>
1086 </div>
1087 <div class="paragraph">
1088 <p>Note that extra commits can be shown to give a meaningful history.</p>
1089 </div>
1090 <div class="paragraph">
1091 <p>The following options affect the way the simplification is performed:</p>
1092 </div>
1093 <div class="dlist">
1094 <dl>
1095 <dt class="hdlist1">Default mode</dt>
1096 <dd>
1097 <p>Simplifies the history to the simplest history explaining the
1098 final state of the tree. Simplest because it prunes some side
1099 branches if the end result is the same (i.e. merging branches
1100 with the same content)</p>
1101 </dd>
1102 <dt class="hdlist1">--show-pulls</dt>
1103 <dd>
1104 <p>Include all commits from the default mode, but also any merge
1105 commits that are not TREESAME to the first parent but are
1106 TREESAME to a later parent. This mode is helpful for showing
1107 the merge commits that "first introduced" a change to a branch.</p>
1108 </dd>
1109 <dt class="hdlist1">--full-history</dt>
1110 <dd>
1111 <p>Same as the default mode, but does not prune some history.</p>
1112 </dd>
1113 <dt class="hdlist1">--dense</dt>
1114 <dd>
1115 <p>Only the selected commits are shown, plus some to have a
1116 meaningful history.</p>
1117 </dd>
1118 <dt class="hdlist1">--sparse</dt>
1119 <dd>
1120 <p>All commits in the simplified history are shown.</p>
1121 </dd>
1122 <dt class="hdlist1">--simplify-merges</dt>
1123 <dd>
1124 <p>Additional option to <code>--full-history</code> to remove some needless
1125 merges from the resulting history, as there are no selected
1126 commits contributing to this merge.</p>
1127 </dd>
1128 <dt class="hdlist1">--ancestry-path[=&lt;commit&gt;]</dt>
1129 <dd>
1130 <p>When given a range of commits to display (e.g. <em>commit1..commit2</em>
1131 or <em>commit2 ^commit1</em>), and a commit &lt;commit&gt; in that range,
1132 only display commits in that range
1133 that are ancestors of &lt;commit&gt;, descendants of &lt;commit&gt;, or
1134 &lt;commit&gt; itself. If no commit is specified, use <em>commit1</em> (the
1135 excluded part of the range) as &lt;commit&gt;. Can be passed multiple
1136 times; if so, a commit is included if it is any of the commits
1137 given or if it is an ancestor or descendant of one of them.</p>
1138 </dd>
1139 </dl>
1140 </div>
1141 <div class="paragraph">
1142 <p>A more detailed explanation follows.</p>
1143 </div>
1144 <div class="paragraph">
1145 <p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1146 that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1147 filtered for <code>foo</code>, they look different and equal, respectively.)</p>
1148 </div>
1149 <div class="paragraph">
1150 <p>In the following, we will always refer to the same example history to
1151 illustrate the differences between simplification settings. We assume
1152 that you are filtering for a file <code>foo</code> in this commit graph:</p>
1153 </div>
1154 <div class="listingblock">
1155 <div class="content">
1156 <pre> .-A---M---N---O---P---Q
1157 / / / / / /
1158 I B C D E Y
1159 \ / / / / /
1160 `-------------' X</pre>
1161 </div>
1162 </div>
1163 <div class="paragraph">
1164 <p>The horizontal line of history A---Q is taken to be the first parent of
1165 each merge. The commits are:</p>
1166 </div>
1167 <div class="ulist">
1168 <ul>
1169 <li>
1170 <p><code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1171 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1172 commits are compared to an empty tree, so <code>I</code> is !TREESAME.</p>
1173 </li>
1174 <li>
1175 <p>In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.</p>
1176 </li>
1177 <li>
1178 <p><code>B</code> contains the same change as <code>A</code>. Its merge <code>M</code> is trivial and
1179 hence TREESAME to all parents.</p>
1180 </li>
1181 <li>
1182 <p><code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to &#8220;foobar&#8221;,
1183 so it is not TREESAME to any parent.</p>
1184 </li>
1185 <li>
1186 <p><code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1187 <code>N</code> and <code>D</code> to &#8220;foobarbaz&#8221;; i.e., it is not TREESAME to any parent.</p>
1188 </li>
1189 <li>
1190 <p><code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1191 strings to &#8220;quux xyzzy&#8221;. <code>P</code> is TREESAME to <code>O</code>, but not to <code>E</code>.</p>
1192 </li>
1193 <li>
1194 <p><code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1195 modified it. <code>Y</code> is TREESAME to <code>X</code>. Its merge <code>Q</code> added <code>side</code> to <code>P</code>, and
1196 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.</p>
1197 </li>
1198 </ul>
1199 </div>
1200 <div class="paragraph">
1201 <p><code>rev-list</code> walks backwards through history, including or excluding
1202 commits based on whether <code>--full-history</code> and/or parent rewriting
1203 (via <code>--parents</code> or <code>--children</code>) are used. The following settings
1204 are available.</p>
1205 </div>
1206 <div class="dlist">
1207 <dl>
1208 <dt class="hdlist1">Default mode</dt>
1209 <dd>
1210 <p>Commits are included if they are not TREESAME to any parent
1211 (though this can be changed, see <code>--sparse</code> below). If the
1212 commit was a merge, and it was TREESAME to one parent, follow
1213 only that parent. (Even if there are several TREESAME
1214 parents, follow only one of them.) Otherwise, follow all
1215 parents.</p>
1216 <div class="paragraph">
1217 <p>This results in:</p>
1218 </div>
1219 <div class="listingblock">
1220 <div class="content">
1221 <pre> .-A---N---O
1222 / / /
1223 I---------D</pre>
1224 </div>
1225 </div>
1226 <div class="paragraph">
1227 <p>Note how the rule to only follow the TREESAME parent, if one is
1228 available, removed <code>B</code> from consideration entirely. <code>C</code> was
1229 considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1230 empty tree, so <code>I</code> is !TREESAME.</p>
1231 </div>
1232 <div class="paragraph">
1233 <p>Parent/child relations are only visible with <code>--parents</code>, but that does
1234 not affect the commits selected in default mode, so we have shown the
1235 parent lines.</p>
1236 </div>
1237 </dd>
1238 <dt class="hdlist1">--full-history without parent rewriting</dt>
1239 <dd>
1240 <p>This mode differs from the default in one point: always follow
1241 all parents of a merge, even if it is TREESAME to one of them.
1242 Even if more than one side of the merge has commits that are
1243 included, this does not imply that the merge itself is! In
1244 the example, we get</p>
1245 <div class="listingblock">
1246 <div class="content">
1247 <pre> I A B N D O P Q</pre>
1248 </div>
1249 </div>
1250 <div class="paragraph">
1251 <p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1252 <code>C</code> and <code>B</code> were all walked, but only <code>B</code> was !TREESAME, so the others
1253 do not appear.</p>
1254 </div>
1255 <div class="paragraph">
1256 <p>Note that without parent rewriting, it is not really possible to talk
1257 about the parent/child relationships between the commits, so we show
1258 them disconnected.</p>
1259 </div>
1260 </dd>
1261 <dt class="hdlist1">--full-history with parent rewriting</dt>
1262 <dd>
1263 <p>Ordinary commits are only included if they are !TREESAME
1264 (though this can be changed, see <code>--sparse</code> below).</p>
1265 <div class="paragraph">
1266 <p>Merges are always included. However, their parent list is rewritten:
1267 Along each parent, prune away commits that are not included
1268 themselves. This results in</p>
1269 </div>
1270 <div class="listingblock">
1271 <div class="content">
1272 <pre> .-A---M---N---O---P---Q
1273 / / / / /
1274 I B / D /
1275 \ / / / /
1276 `-------------'</pre>
1277 </div>
1278 </div>
1279 <div class="paragraph">
1280 <p>Compare to <code>--full-history</code> without rewriting above. Note that <code>E</code>
1281 was pruned away because it is TREESAME, but the parent list of P was
1282 rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1283 <code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p>
1284 </div>
1285 </dd>
1286 </dl>
1287 </div>
1288 <div class="paragraph">
1289 <p>In addition to the above settings, you can change whether TREESAME
1290 affects inclusion:</p>
1291 </div>
1292 <div class="dlist">
1293 <dl>
1294 <dt class="hdlist1">--dense</dt>
1295 <dd>
1296 <p>Commits that are walked are included if they are not TREESAME
1297 to any parent.</p>
1298 </dd>
1299 <dt class="hdlist1">--sparse</dt>
1300 <dd>
1301 <p>All commits that are walked are included.</p>
1302 <div class="paragraph">
1303 <p>Note that without <code>--full-history</code>, this still simplifies merges: if
1304 one of the parents is TREESAME, we follow only that one, so the other
1305 sides of the merge are never walked.</p>
1306 </div>
1307 </dd>
1308 <dt class="hdlist1">--simplify-merges</dt>
1309 <dd>
1310 <p>First, build a history graph in the same way that
1311 <code>--full-history</code> with parent rewriting does (see above).</p>
1312 <div class="paragraph">
1313 <p>Then simplify each commit <code>C</code> to its replacement <code>C</code>' in the final
1314 history according to the following rules:</p>
1315 </div>
1316 <div class="openblock">
1317 <div class="content">
1318 <div class="ulist">
1319 <ul>
1320 <li>
1321 <p>Set <code>C</code>' to <code>C</code>.</p>
1322 </li>
1323 <li>
1324 <p>Replace each parent <code>P</code> of <code>C</code>' with its simplification <code>P</code>'. In
1325 the process, drop parents that are ancestors of other parents or that are
1326 root commits TREESAME to an empty tree, and remove duplicates, but take care
1327 to never drop all parents that we are TREESAME to.</p>
1328 </li>
1329 <li>
1330 <p>If after this parent rewriting, <code>C</code>' is a root or merge commit (has
1331 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1332 Otherwise, it is replaced with its only parent.</p>
1333 </li>
1334 </ul>
1335 </div>
1336 </div>
1337 </div>
1338 <div class="paragraph">
1339 <p>The effect of this is best shown by way of comparing to
1340 <code>--full-history</code> with parent rewriting. The example turns into:</p>
1341 </div>
1342 <div class="listingblock">
1343 <div class="content">
1344 <pre> .-A---M---N---O
1345 / / /
1346 I B D
1347 \ / /
1348 `---------'</pre>
1349 </div>
1350 </div>
1351 <div class="paragraph">
1352 <p>Note the major differences in <code>N</code>, <code>P</code>, and <code>Q</code> over <code>--full-history</code>:</p>
1353 </div>
1354 <div class="openblock">
1355 <div class="content">
1356 <div class="ulist">
1357 <ul>
1358 <li>
1359 <p><code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1360 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.</p>
1361 </li>
1362 <li>
1363 <p><code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
1364 removed completely, because it had one parent and is TREESAME.</p>
1365 </li>
1366 <li>
1367 <p><code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1368 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
1369 parent and is TREESAME.</p>
1370 </li>
1371 </ul>
1372 </div>
1373 </div>
1374 </div>
1375 </dd>
1376 </dl>
1377 </div>
1378 <div class="paragraph">
1379 <p>There is another simplification mode available:</p>
1380 </div>
1381 <div class="dlist">
1382 <dl>
1383 <dt class="hdlist1">--ancestry-path[=&lt;commit&gt;]</dt>
1384 <dd>
1385 <p>Limit the displayed commits to those which are an ancestor of
1386 &lt;commit&gt;, or which are a descendant of &lt;commit&gt;, or are &lt;commit&gt;
1387 itself.</p>
1388 <div class="paragraph">
1389 <p>As an example use case, consider the following commit history:</p>
1390 </div>
1391 <div class="listingblock">
1392 <div class="content">
1393 <pre> D---E-------F
1394 / \ \
1395 B---C---G---H---I---J
1397 A-------K---------------L--M</pre>
1398 </div>
1399 </div>
1400 <div class="paragraph">
1401 <p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1402 but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1403 what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1404 that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1405 example would be all the commits, except <code>A</code> and <code>B</code> (and <code>D</code> itself,
1406 of course).</p>
1407 </div>
1408 <div class="paragraph">
1409 <p>When we want to find out what commits in <code>M</code> are contaminated with the
1410 bug introduced by <code>D</code> and need fixing, however, we might want to view
1411 only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1412 excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
1413 option does. Applied to the <em>D..M</em> range, it results in:</p>
1414 </div>
1415 <div class="listingblock">
1416 <div class="content">
1417 <pre> E-------F
1419 G---H---I---J
1421 L--M</pre>
1422 </div>
1423 </div>
1424 <div class="paragraph">
1425 <p>We can also use <code>--ancestry-path=D</code> instead of <code>--ancestry-path</code> which
1426 means the same thing when applied to the <em>D..M</em> range but is just more
1427 explicit.</p>
1428 </div>
1429 <div class="paragraph">
1430 <p>If we instead are interested in a given topic within this range, and all
1431 commits affected by that topic, we may only want to view the subset of
1432 <code>D</code><code>..</code><code>M</code> which contain that topic in their ancestry path. So, using
1433 <code>--ancestry-path=H</code> <code>D</code><code>..</code><code>M</code> for example would result in:</p>
1434 </div>
1435 <div class="listingblock">
1436 <div class="content">
1437 <pre> E
1439 G---H---I---J
1441 L--M</pre>
1442 </div>
1443 </div>
1444 <div class="paragraph">
1445 <p>Whereas <code>--ancestry-path=K</code> <code>D</code><code>..</code><code>M</code> would result in</p>
1446 </div>
1447 <div class="listingblock">
1448 <div class="content">
1449 <pre> K---------------L--M</pre>
1450 </div>
1451 </div>
1452 </dd>
1453 </dl>
1454 </div>
1455 <div class="paragraph">
1456 <p>Before discussing another option, <code>--show-pulls</code>, we need to
1457 create a new example history.</p>
1458 </div>
1459 <div class="paragraph">
1460 <p>A common problem users face when looking at simplified history is that a
1461 commit they know changed a file somehow does not appear in the file&#8217;s
1462 simplified history. Let&#8217;s demonstrate a new example and show how options
1463 such as <code>--full-history</code> and <code>--simplify-merges</code> works in that case:</p>
1464 </div>
1465 <div class="listingblock">
1466 <div class="content">
1467 <pre> .-A---M-----C--N---O---P
1468 / / \ \ \/ / /
1469 I B \ R-'`-Z' /
1470 \ / \/ /
1471 \ / /\ /
1472 `---X--' `---Y--'</pre>
1473 </div>
1474 </div>
1475 <div class="paragraph">
1476 <p>For this example, suppose <code>I</code> created <code>file.txt</code> which was modified by
1477 <code>A</code>, <code>B</code>, and <code>X</code> in different ways. The single-parent commits <code>C</code>, <code>Z</code>,
1478 and <code>Y</code> do not change <code>file.txt</code>. The merge commit <code>M</code> was created by
1479 resolving the merge conflict to include both changes from <code>A</code> and <code>B</code>
1480 and hence is not TREESAME to either. The merge commit <code>R</code>, however, was
1481 created by ignoring the contents of <code>file.txt</code> at <code>M</code> and taking only
1482 the contents of <code>file.txt</code> at <code>X</code>. Hence, <code>R</code> is TREESAME to <code>X</code> but not
1483 <code>M</code>. Finally, the natural merge resolution to create <code>N</code> is to take the
1484 contents of <code>file.txt</code> at <code>R</code>, so <code>N</code> is TREESAME to <code>R</code> but not <code>C</code>.
1485 The merge commits <code>O</code> and <code>P</code> are TREESAME to their first parents, but
1486 not to their second parents, <code>Z</code> and <code>Y</code> respectively.</p>
1487 </div>
1488 <div class="paragraph">
1489 <p>When using the default mode, <code>N</code> and <code>R</code> both have a TREESAME parent, so
1490 those edges are walked and the others are ignored. The resulting history
1491 graph is:</p>
1492 </div>
1493 <div class="listingblock">
1494 <div class="content">
1495 <pre> I---X</pre>
1496 </div>
1497 </div>
1498 <div class="paragraph">
1499 <p>When using <code>--full-history</code>, Git walks every edge. This will discover
1500 the commits <code>A</code> and <code>B</code> and the merge <code>M</code>, but also will reveal the
1501 merge commits <code>O</code> and <code>P</code>. With parent rewriting, the resulting graph is:</p>
1502 </div>
1503 <div class="listingblock">
1504 <div class="content">
1505 <pre> .-A---M--------N---O---P
1506 / / \ \ \/ / /
1507 I B \ R-'`--' /
1508 \ / \/ /
1509 \ / /\ /
1510 `---X--' `------'</pre>
1511 </div>
1512 </div>
1513 <div class="paragraph">
1514 <p>Here, the merge commits <code>O</code> and <code>P</code> contribute extra noise, as they did
1515 not actually contribute a change to <code>file.txt</code>. They only merged a topic
1516 that was based on an older version of <code>file.txt</code>. This is a common
1517 issue in repositories using a workflow where many contributors work in
1518 parallel and merge their topic branches along a single trunk: many
1519 unrelated merges appear in the <code>--full-history</code> results.</p>
1520 </div>
1521 <div class="paragraph">
1522 <p>When using the <code>--simplify-merges</code> option, the commits <code>O</code> and <code>P</code>
1523 disappear from the results. This is because the rewritten second parents
1524 of <code>O</code> and <code>P</code> are reachable from their first parents. Those edges are
1525 removed and then the commits look like single-parent commits that are
1526 TREESAME to their parent. This also happens to the commit <code>N</code>, resulting
1527 in a history view as follows:</p>
1528 </div>
1529 <div class="listingblock">
1530 <div class="content">
1531 <pre> .-A---M--.
1532 / / \
1533 I B R
1534 \ / /
1535 \ / /
1536 `---X--'</pre>
1537 </div>
1538 </div>
1539 <div class="paragraph">
1540 <p>In this view, we see all of the important single-parent changes from
1541 <code>A</code>, <code>B</code>, and <code>X</code>. We also see the carefully-resolved merge <code>M</code> and the
1542 not-so-carefully-resolved merge <code>R</code>. This is usually enough information
1543 to determine why the commits <code>A</code> and <code>B</code> "disappeared" from history in
1544 the default view. However, there are a few issues with this approach.</p>
1545 </div>
1546 <div class="paragraph">
1547 <p>The first issue is performance. Unlike any previous option, the
1548 <code>--simplify-merges</code> option requires walking the entire commit history
1549 before returning a single result. This can make the option difficult to
1550 use for very large repositories.</p>
1551 </div>
1552 <div class="paragraph">
1553 <p>The second issue is one of auditing. When many contributors are working
1554 on the same repository, it is important which merge commits introduced
1555 a change into an important branch. The problematic merge <code>R</code> above is
1556 not likely to be the merge commit that was used to merge into an
1557 important branch. Instead, the merge <code>N</code> was used to merge <code>R</code> and <code>X</code>
1558 into the important branch. This commit may have information about why
1559 the change <code>X</code> came to override the changes from <code>A</code> and <code>B</code> in its
1560 commit message.</p>
1561 </div>
1562 <div class="dlist">
1563 <dl>
1564 <dt class="hdlist1">--show-pulls</dt>
1565 <dd>
1566 <p>In addition to the commits shown in the default history, show
1567 each merge commit that is not TREESAME to its first parent but
1568 is TREESAME to a later parent.</p>
1569 <div class="paragraph">
1570 <p>When a merge commit is included by <code>--show-pulls</code>, the merge is
1571 treated as if it "pulled" the change from another branch. When using
1572 <code>--show-pulls</code> on this example (and no other options) the resulting
1573 graph is:</p>
1574 </div>
1575 <div class="listingblock">
1576 <div class="content">
1577 <pre> I---X---R---N</pre>
1578 </div>
1579 </div>
1580 <div class="paragraph">
1581 <p>Here, the merge commits <code>R</code> and <code>N</code> are included because they pulled
1582 the commits <code>X</code> and <code>R</code> into the base branch, respectively. These
1583 merges are the reason the commits <code>A</code> and <code>B</code> do not appear in the
1584 default history.</p>
1585 </div>
1586 <div class="paragraph">
1587 <p>When <code>--show-pulls</code> is paired with <code>--simplify-merges</code>, the
1588 graph includes all of the necessary information:</p>
1589 </div>
1590 <div class="listingblock">
1591 <div class="content">
1592 <pre> .-A---M--. N
1593 / / \ /
1594 I B R
1595 \ / /
1596 \ / /
1597 `---X--'</pre>
1598 </div>
1599 </div>
1600 <div class="paragraph">
1601 <p>Notice that since <code>M</code> is reachable from <code>R</code>, the edge from <code>N</code> to <code>M</code>
1602 was simplified away. However, <code>N</code> still appears in the history as an
1603 important commit because it "pulled" the change <code>R</code> into the main
1604 branch.</p>
1605 </div>
1606 </dd>
1607 </dl>
1608 </div>
1609 <div class="paragraph">
1610 <p>The <code>--simplify-by-decoration</code> option allows you to view only the
1611 big picture of the topology of the history, by omitting commits
1612 that are not referenced by tags. Commits are marked as !TREESAME
1613 (in other words, kept after history simplification rules described
1614 above) if (1) they are referenced by tags, or (2) they change the
1615 contents of the paths given on the command line. All other
1616 commits are marked as TREESAME (subject to be simplified away).</p>
1617 </div>
1618 </div>
1619 <div class="sect2">
1620 <h3 id="_commit_ordering">Commit Ordering</h3>
1621 <div class="paragraph">
1622 <p>By default, the commits are shown in reverse chronological order.</p>
1623 </div>
1624 <div class="dlist">
1625 <dl>
1626 <dt class="hdlist1">--date-order</dt>
1627 <dd>
1628 <p>Show no parents before all of its children are shown, but
1629 otherwise show commits in the commit timestamp order.</p>
1630 </dd>
1631 <dt class="hdlist1">--author-date-order</dt>
1632 <dd>
1633 <p>Show no parents before all of its children are shown, but
1634 otherwise show commits in the author timestamp order.</p>
1635 </dd>
1636 <dt class="hdlist1">--topo-order</dt>
1637 <dd>
1638 <p>Show no parents before all of its children are shown, and
1639 avoid showing commits on multiple lines of history
1640 intermixed.</p>
1641 <div class="paragraph">
1642 <p>For example, in a commit history like this:</p>
1643 </div>
1644 <div class="listingblock">
1645 <div class="content">
1646 <pre> ---1----2----4----7
1648 3----5----6----8---</pre>
1649 </div>
1650 </div>
1651 <div class="paragraph">
1652 <p>where the numbers denote the order of commit timestamps, <code>git</code>
1653 <code>rev-list</code> and friends with <code>--date-order</code> show the commits in the
1654 timestamp order: 8 7 6 5 4 3 2 1.</p>
1655 </div>
1656 <div class="paragraph">
1657 <p>With <code>--topo-order</code>, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
1658 3 1); some older commits are shown before newer ones in order to
1659 avoid showing the commits from two parallel development track mixed
1660 together.</p>
1661 </div>
1662 </dd>
1663 <dt class="hdlist1">--reverse</dt>
1664 <dd>
1665 <p>Output the commits chosen to be shown (see Commit Limiting
1666 section above) in reverse order. Cannot be combined with
1667 <code>--walk-reflogs</code>.</p>
1668 </dd>
1669 </dl>
1670 </div>
1671 </div>
1672 <div class="sect2">
1673 <h3 id="_object_traversal">Object Traversal</h3>
1674 <div class="paragraph">
1675 <p>These options are mostly targeted for packing of Git repositories.</p>
1676 </div>
1677 <div class="dlist">
1678 <dl>
1679 <dt class="hdlist1">--no-walk[=(sorted|unsorted)]</dt>
1680 <dd>
1681 <p>Only show the given commits, but do not traverse their ancestors.
1682 This has no effect if a range is specified. If the argument
1683 <code>unsorted</code> is given, the commits are shown in the order they were
1684 given on the command line. Otherwise (if <code>sorted</code> or no argument
1685 was given), the commits are shown in reverse chronological order
1686 by commit time.
1687 Cannot be combined with <code>--graph</code>.</p>
1688 </dd>
1689 <dt class="hdlist1">--do-walk</dt>
1690 <dd>
1691 <p>Overrides a previous <code>--no-walk</code>.</p>
1692 </dd>
1693 </dl>
1694 </div>
1695 </div>
1696 <div class="sect2">
1697 <h3 id="_commit_formatting">Commit Formatting</h3>
1698 <div class="dlist">
1699 <dl>
1700 <dt class="hdlist1">--pretty[=&lt;format&gt;]</dt>
1701 <dt class="hdlist1">--format=&lt;format&gt;</dt>
1702 <dd>
1703 <p>Pretty-print the contents of the commit logs in a given format,
1704 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1705 <em>full</em>, <em>fuller</em>, <em>reference</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1706 and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1707 and has <em>%placeholder</em> in it, it acts as if
1708 <em>--pretty=tformat:&lt;format&gt;</em> were given.</p>
1709 <div class="paragraph">
1710 <p>See the "PRETTY FORMATS" section for some additional details for each
1711 format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p>
1712 </div>
1713 <div class="paragraph">
1714 <p>Note: you can specify the default pretty format in the repository
1715 configuration (see <a href="git-config.html">git-config(1)</a>).</p>
1716 </div>
1717 </dd>
1718 <dt class="hdlist1">--abbrev-commit</dt>
1719 <dd>
1720 <p>Instead of showing the full 40-byte hexadecimal commit object
1721 name, show a prefix that names the object uniquely.
1722 "--abbrev=&lt;n&gt;" (which also modifies diff output, if it is displayed)
1723 option can be used to specify the minimum length of the prefix.</p>
1724 <div class="paragraph">
1725 <p>This should make "--pretty=oneline" a whole lot more readable for
1726 people using 80-column terminals.</p>
1727 </div>
1728 </dd>
1729 <dt class="hdlist1">--no-abbrev-commit</dt>
1730 <dd>
1731 <p>Show the full 40-byte hexadecimal commit object name. This negates
1732 <code>--abbrev-commit</code>, either explicit or implied by other options such
1733 as "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.</p>
1734 </dd>
1735 <dt class="hdlist1">--oneline</dt>
1736 <dd>
1737 <p>This is a shorthand for "--pretty=oneline --abbrev-commit"
1738 used together.</p>
1739 </dd>
1740 <dt class="hdlist1">--encoding=&lt;encoding&gt;</dt>
1741 <dd>
1742 <p>Commit objects record the character encoding used for the log message
1743 in their encoding header; this option can be used to tell the
1744 command to re-code the commit log message in the encoding
1745 preferred by the user. For non plumbing commands this
1746 defaults to UTF-8. Note that if an object claims to be encoded
1747 in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1748 verbatim; this means that invalid sequences in the original
1749 commit may be copied to the output. Likewise, if iconv(3) fails
1750 to convert the commit, we will quietly output the original
1751 object verbatim.</p>
1752 </dd>
1753 <dt class="hdlist1">--expand-tabs=&lt;n&gt;</dt>
1754 <dt class="hdlist1">--expand-tabs</dt>
1755 <dt class="hdlist1">--no-expand-tabs</dt>
1756 <dd>
1757 <p>Perform a tab expansion (replace each tab with enough spaces
1758 to fill to the next display column that is a multiple of <em>&lt;n&gt;</em>)
1759 in the log message before showing it in the output.
1760 <code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1761 <code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1762 which disables tab expansion.</p>
1763 <div class="paragraph">
1764 <p>By default, tabs are expanded in pretty formats that indent the log
1765 message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1766 and <em>fuller</em>).</p>
1767 </div>
1768 </dd>
1769 <dt class="hdlist1">--notes[=&lt;ref&gt;]</dt>
1770 <dd>
1771 <p>Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
1772 commit, when showing the commit log message. This is the default
1773 for <code>git</code> <code>log</code>, <code>git</code> <code>show</code> and <code>git</code> <code>whatchanged</code> commands when
1774 there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
1775 on the command line.</p>
1776 <div class="paragraph">
1777 <p>By default, the notes shown are from the notes refs listed in the
1778 <code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
1779 environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p>
1780 </div>
1781 <div class="paragraph">
1782 <p>With an optional <em>&lt;ref&gt;</em> argument, use the ref to find the notes
1783 to display. The ref can specify the full refname when it begins
1784 with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
1785 <code>refs/notes/</code> is prefixed to form the full name of the ref.</p>
1786 </div>
1787 <div class="paragraph">
1788 <p>Multiple --notes options can be combined to control which notes are
1789 being displayed. Examples: "--notes=foo" will show only notes from
1790 "refs/notes/foo"; "--notes=foo --notes" will show both notes from
1791 "refs/notes/foo" and from the default notes ref(s).</p>
1792 </div>
1793 </dd>
1794 <dt class="hdlist1">--no-notes</dt>
1795 <dd>
1796 <p>Do not show notes. This negates the above <code>--notes</code> option, by
1797 resetting the list of notes refs from which notes are shown.
1798 Options are parsed in the order given on the command line, so e.g.
1799 "--notes --notes=foo --no-notes --notes=bar" will only show notes
1800 from "refs/notes/bar".</p>
1801 </dd>
1802 <dt class="hdlist1">--show-notes-by-default</dt>
1803 <dd>
1804 <p>Show the default notes unless options for displaying specific
1805 notes are given.</p>
1806 </dd>
1807 <dt class="hdlist1">--show-notes[=&lt;ref&gt;]</dt>
1808 <dt class="hdlist1">--[no-]standard-notes</dt>
1809 <dd>
1810 <p>These options are deprecated. Use the above --notes/--no-notes
1811 options instead.</p>
1812 </dd>
1813 <dt class="hdlist1">--show-signature</dt>
1814 <dd>
1815 <p>Check the validity of a signed commit object by passing the signature
1816 to <code>gpg</code> <code>--verify</code> and show the output.</p>
1817 </dd>
1818 <dt class="hdlist1">--relative-date</dt>
1819 <dd>
1820 <p>Synonym for <code>--date=relative</code>.</p>
1821 </dd>
1822 <dt class="hdlist1">--date=&lt;format&gt;</dt>
1823 <dd>
1824 <p>Only takes effect for dates shown in human-readable format, such
1825 as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
1826 value for the log command&#8217;s <code>--date</code> option. By default, dates
1827 are shown in the original time zone (either committer&#8217;s or
1828 author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
1829 <code>iso-local</code>), the user&#8217;s local time zone is used instead.</p>
1830 <div class="openblock">
1831 <div class="content">
1832 <div class="paragraph">
1833 <p><code>--date=relative</code> shows dates relative to the current time,
1834 e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
1835 <code>--date=relative</code>.</p>
1836 </div>
1837 <div class="paragraph">
1838 <p><code>--date=local</code> is an alias for <code>--date=default-local</code>.</p>
1839 </div>
1840 <div class="paragraph">
1841 <p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
1842 The differences to the strict ISO 8601 format are:</p>
1843 </div>
1844 <div class="ulist">
1845 <ul>
1846 <li>
1847 <p>a space instead of the <code>T</code> date/time delimiter</p>
1848 </li>
1849 <li>
1850 <p>a space between time and time zone</p>
1851 </li>
1852 <li>
1853 <p>no colon between hours and minutes of the time zone</p>
1854 </li>
1855 </ul>
1856 </div>
1857 <div class="paragraph">
1858 <p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
1859 ISO 8601 format.</p>
1860 </div>
1861 <div class="paragraph">
1862 <p><code>--date=rfc</code> (or <code>--date=rfc2822</code>) shows timestamps in RFC 2822
1863 format, often found in email messages.</p>
1864 </div>
1865 <div class="paragraph">
1866 <p><code>--date=short</code> shows only the date, but not the time, in <code>YYYY-MM-DD</code> format.</p>
1867 </div>
1868 <div class="paragraph">
1869 <p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
1870 00:00:00 UTC), followed by a space, and then the timezone as an offset
1871 from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
1872 the second two are minutes). I.e., as if the timestamp were formatted
1873 with <code>strftime</code>("%s %z")).
1874 Note that the <code>-local</code> option does not affect the seconds-since-epoch
1875 value (which is always measured in UTC), but does switch the accompanying
1876 timezone value.</p>
1877 </div>
1878 <div class="paragraph">
1879 <p><code>--date=human</code> shows the timezone if the timezone does not match the
1880 current time-zone, and doesn&#8217;t print the whole date if that matches
1881 (ie skip printing year for dates that are "this year", but also skip
1882 the whole date itself if it&#8217;s in the last few days and we can just say
1883 what weekday it was). For older dates the hour and minute is also
1884 omitted.</p>
1885 </div>
1886 <div class="paragraph">
1887 <p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
1888 1970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
1889 has no effect.</p>
1890 </div>
1891 <div class="paragraph">
1892 <p><code>--date=format:..</code>. feeds the format ... to your system <code>strftime</code>,
1893 except for %s, %z, and %Z, which are handled internally.
1894 Use <code>--date=format:</code>%c to show the date in your system locale&#8217;s
1895 preferred format. See the <code>strftime</code> manual for a complete list of
1896 format placeholders. When using <code>-local</code>, the correct syntax is
1897 <code>--date=format-local:..</code>..</p>
1898 </div>
1899 <div class="paragraph">
1900 <p><code>--date=default</code> is the default format, and is based on ctime(3)
1901 output. It shows a single line with three-letter day of the week,
1902 three-letter month, day-of-month, hour-minute-seconds in "HH:MM:SS"
1903 format, followed by 4-digit year, plus timezone information, unless
1904 the local time zone is used, e.g. <code>Thu</code> <code>Jan</code> <code>1</code> <code>00:00:00</code> <code>1970</code> <code>+0000</code>.</p>
1905 </div>
1906 </div>
1907 </div>
1908 </dd>
1909 <dt class="hdlist1">--parents</dt>
1910 <dd>
1911 <p>Print also the parents of the commit (in the form "commit parent&#8230;&#8203;").
1912 Also enables parent rewriting, see <em>History Simplification</em> above.</p>
1913 </dd>
1914 <dt class="hdlist1">--children</dt>
1915 <dd>
1916 <p>Print also the children of the commit (in the form "commit child&#8230;&#8203;").
1917 Also enables parent rewriting, see <em>History Simplification</em> above.</p>
1918 </dd>
1919 <dt class="hdlist1">--left-right</dt>
1920 <dd>
1921 <p>Mark which side of a symmetric difference a commit is reachable from.
1922 Commits from the left side are prefixed with &lt; and those from
1923 the right with &gt;. If combined with <code>--boundary</code>, those
1924 commits are prefixed with <code>-</code>.</p>
1925 <div class="paragraph">
1926 <p>For example, if you have this topology:</p>
1927 </div>
1928 <div class="listingblock">
1929 <div class="content">
1930 <pre> y---b---b branch B
1931 / \ /
1933 / / \
1934 o---x---a---a branch A</pre>
1935 </div>
1936 </div>
1937 <div class="paragraph">
1938 <p>you would get an output like this:</p>
1939 </div>
1940 <div class="listingblock">
1941 <div class="content">
1942 <pre> $ git rev-list --left-right --boundary --pretty=oneline A...B
1944 &gt;bbbbbbb... 3rd on b
1945 &gt;bbbbbbb... 2nd on b
1946 &lt;aaaaaaa... 3rd on a
1947 &lt;aaaaaaa... 2nd on a
1948 -yyyyyyy... 1st on b
1949 -xxxxxxx... 1st on a</pre>
1950 </div>
1951 </div>
1952 </dd>
1953 <dt class="hdlist1">--graph</dt>
1954 <dd>
1955 <p>Draw a text-based graphical representation of the commit history
1956 on the left hand side of the output. This may cause extra lines
1957 to be printed in between commits, in order for the graph history
1958 to be drawn properly.
1959 Cannot be combined with <code>--no-walk</code>.</p>
1960 <div class="paragraph">
1961 <p>This enables parent rewriting, see <em>History Simplification</em> above.</p>
1962 </div>
1963 <div class="paragraph">
1964 <p>This implies the <code>--topo-order</code> option by default, but the
1965 <code>--date-order</code> option may also be specified.</p>
1966 </div>
1967 </dd>
1968 <dt class="hdlist1">--show-linear-break[=&lt;barrier&gt;]</dt>
1969 <dd>
1970 <p>When --graph is not used, all history branches are flattened
1971 which can make it hard to see that the two consecutive commits
1972 do not belong to a linear branch. This option puts a barrier
1973 in between them in that case. If <em>&lt;barrier&gt;</em> is specified, it
1974 is the string that will be shown instead of the default one.</p>
1975 </dd>
1976 </dl>
1977 </div>
1978 </div>
1979 </div>
1980 </div>
1981 <div class="sect1">
1982 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
1983 <div class="sectionbody">
1984 <div class="paragraph">
1985 <p>If the commit is a merge, and if the pretty-format
1986 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
1987 inserted before the <em>Author:</em> line. This line begins with
1988 "Merge: " and the hashes of ancestral commits are printed,
1989 separated by spaces. Note that the listed commits may not
1990 necessarily be the list of the <strong>direct</strong> parent commits if you
1991 have limited your view of history: for example, if you are
1992 only interested in changes related to a certain directory or
1993 file.</p>
1994 </div>
1995 <div class="paragraph">
1996 <p>There are several built-in formats, and you can define
1997 additional formats by setting a pretty.&lt;name&gt;
1998 config option to either another format name, or a
1999 <em>format:</em> string, as described below (see
2000 <a href="git-config.html">git-config(1)</a>). Here are the details of the
2001 built-in formats:</p>
2002 </div>
2003 <div class="ulist">
2004 <ul>
2005 <li>
2006 <p><em>oneline</em></p>
2007 <div class="literalblock">
2008 <div class="content">
2009 <pre>&lt;hash&gt; &lt;title-line&gt;</pre>
2010 </div>
2011 </div>
2012 <div class="paragraph">
2013 <p>This is designed to be as compact as possible.</p>
2014 </div>
2015 </li>
2016 <li>
2017 <p><em>short</em></p>
2018 <div class="literalblock">
2019 <div class="content">
2020 <pre>commit &lt;hash&gt;
2021 Author: &lt;author&gt;</pre>
2022 </div>
2023 </div>
2024 <div class="literalblock">
2025 <div class="content">
2026 <pre>&lt;title-line&gt;</pre>
2027 </div>
2028 </div>
2029 </li>
2030 <li>
2031 <p><em>medium</em></p>
2032 <div class="literalblock">
2033 <div class="content">
2034 <pre>commit &lt;hash&gt;
2035 Author: &lt;author&gt;
2036 Date: &lt;author-date&gt;</pre>
2037 </div>
2038 </div>
2039 <div class="literalblock">
2040 <div class="content">
2041 <pre>&lt;title-line&gt;</pre>
2042 </div>
2043 </div>
2044 <div class="literalblock">
2045 <div class="content">
2046 <pre>&lt;full-commit-message&gt;</pre>
2047 </div>
2048 </div>
2049 </li>
2050 <li>
2051 <p><em>full</em></p>
2052 <div class="literalblock">
2053 <div class="content">
2054 <pre>commit &lt;hash&gt;
2055 Author: &lt;author&gt;
2056 Commit: &lt;committer&gt;</pre>
2057 </div>
2058 </div>
2059 <div class="literalblock">
2060 <div class="content">
2061 <pre>&lt;title-line&gt;</pre>
2062 </div>
2063 </div>
2064 <div class="literalblock">
2065 <div class="content">
2066 <pre>&lt;full-commit-message&gt;</pre>
2067 </div>
2068 </div>
2069 </li>
2070 <li>
2071 <p><em>fuller</em></p>
2072 <div class="literalblock">
2073 <div class="content">
2074 <pre>commit &lt;hash&gt;
2075 Author: &lt;author&gt;
2076 AuthorDate: &lt;author-date&gt;
2077 Commit: &lt;committer&gt;
2078 CommitDate: &lt;committer-date&gt;</pre>
2079 </div>
2080 </div>
2081 <div class="literalblock">
2082 <div class="content">
2083 <pre>&lt;title-line&gt;</pre>
2084 </div>
2085 </div>
2086 <div class="literalblock">
2087 <div class="content">
2088 <pre>&lt;full-commit-message&gt;</pre>
2089 </div>
2090 </div>
2091 </li>
2092 <li>
2093 <p><em>reference</em></p>
2094 <div class="literalblock">
2095 <div class="content">
2096 <pre>&lt;abbrev-hash&gt; (&lt;title-line&gt;, &lt;short-author-date&gt;)</pre>
2097 </div>
2098 </div>
2099 <div class="paragraph">
2100 <p>This format is used to refer to another commit in a commit message and
2101 is the same as <code>--pretty=</code>'format:%C(<code>auto</code>)%h (%s, %ad)'. By default,
2102 the date is formatted with <code>--date=short</code> unless another <code>--date</code> option
2103 is explicitly specified. As with any <code>format:</code> with format
2104 placeholders, its output is not affected by other options like
2105 <code>--decorate</code> and <code>--walk-reflogs</code>.</p>
2106 </div>
2107 </li>
2108 <li>
2109 <p><em>email</em></p>
2110 <div class="literalblock">
2111 <div class="content">
2112 <pre>From &lt;hash&gt; &lt;date&gt;
2113 From: &lt;author&gt;
2114 Date: &lt;author-date&gt;
2115 Subject: [PATCH] &lt;title-line&gt;</pre>
2116 </div>
2117 </div>
2118 <div class="literalblock">
2119 <div class="content">
2120 <pre>&lt;full-commit-message&gt;</pre>
2121 </div>
2122 </div>
2123 </li>
2124 <li>
2125 <p><em>mboxrd</em></p>
2126 <div class="paragraph">
2127 <p>Like <em>email</em>, but lines in the commit message starting with "From "
2128 (preceded by zero or more "&gt;") are quoted with "&gt;" so they aren&#8217;t
2129 confused as starting a new commit.</p>
2130 </div>
2131 </li>
2132 <li>
2133 <p><em>raw</em></p>
2134 <div class="paragraph">
2135 <p>The <em>raw</em> format shows the entire commit exactly as
2136 stored in the commit object. Notably, the hashes are
2137 displayed in full, regardless of whether --abbrev or
2138 --no-abbrev are used, and <em>parents</em> information show the
2139 true parent commits, without taking grafts or history
2140 simplification into account. Note that this format affects the way
2141 commits are displayed, but not the way the diff is shown e.g. with
2142 <code>git</code> <code>log</code> <code>--raw</code>. To get full object names in a raw diff format,
2143 use <code>--no-abbrev</code>.</p>
2144 </div>
2145 </li>
2146 <li>
2147 <p><em>format:&lt;format-string&gt;</em></p>
2148 <div class="paragraph">
2149 <p>The <em>format:&lt;format-string&gt;</em> format allows you to specify which information
2150 you want to show. It works a little bit like printf format,
2151 with the notable exception that you get a newline with <em>%n</em>
2152 instead of <em>\n</em>.</p>
2153 </div>
2154 <div class="paragraph">
2155 <p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
2156 would show something like this:</p>
2157 </div>
2158 <div class="listingblock">
2159 <div class="content">
2160 <pre>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2161 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</pre>
2162 </div>
2163 </div>
2164 <div class="paragraph">
2165 <p>The placeholders are:</p>
2166 </div>
2167 <div class="ulist">
2168 <ul>
2169 <li>
2170 <p>Placeholders that expand to a single literal character:</p>
2171 <div class="dlist">
2172 <dl>
2173 <dt class="hdlist1"><em>%n</em></dt>
2174 <dd>
2175 <p>newline</p>
2176 </dd>
2177 <dt class="hdlist1"><em>%%</em></dt>
2178 <dd>
2179 <p>a raw <em>%</em></p>
2180 </dd>
2181 <dt class="hdlist1"><em>%x00</em></dt>
2182 <dd>
2183 <p><em>%x</em> followed by two hexadecimal digits is replaced with a
2184 byte with the hexadecimal digits' value (we will call this
2185 "literal formatting code" in the rest of this document).</p>
2186 </dd>
2187 </dl>
2188 </div>
2189 </li>
2190 <li>
2191 <p>Placeholders that affect formatting of later placeholders:</p>
2192 <div class="dlist">
2193 <dl>
2194 <dt class="hdlist1"><em>%Cred</em></dt>
2195 <dd>
2196 <p>switch color to red</p>
2197 </dd>
2198 <dt class="hdlist1"><em>%Cgreen</em></dt>
2199 <dd>
2200 <p>switch color to green</p>
2201 </dd>
2202 <dt class="hdlist1"><em>%Cblue</em></dt>
2203 <dd>
2204 <p>switch color to blue</p>
2205 </dd>
2206 <dt class="hdlist1"><em>%Creset</em></dt>
2207 <dd>
2208 <p>reset color</p>
2209 </dd>
2210 <dt class="hdlist1"><em>%C(&#8230;&#8203;)</em></dt>
2211 <dd>
2212 <p>color specification, as described under Values in the
2213 "CONFIGURATION FILE" section of <a href="git-config.html">git-config(1)</a>. By
2214 default, colors are shown only when enabled for log output
2215 (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and respecting
2216 the <code>auto</code> settings of the former if we are going to a
2217 terminal). %C(<code>auto,</code><code>...</code>) is accepted as a historical
2218 synonym for the default (e.g., %C(<code>auto,red</code>)). Specifying
2219 %C(<code>always,</code><code>...</code>) will show the colors even when color is
2220 not otherwise enabled (though consider just using
2221 <code>--color=always</code> to enable color for the whole output,
2222 including this format and anything else git might color).
2223 <code>auto</code> alone (i.e. %C(<code>auto</code>)) will turn on auto coloring
2224 on the next placeholders until the color is switched
2225 again.</p>
2226 </dd>
2227 <dt class="hdlist1"><em>%m</em></dt>
2228 <dd>
2229 <p>left (&lt;), right (&gt;) or boundary (<code>-</code>) mark</p>
2230 </dd>
2231 <dt class="hdlist1"><em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em></dt>
2232 <dd>
2233 <p>switch line wrapping, like the -w option of
2234 <a href="git-shortlog.html">git-shortlog(1)</a>.</p>
2235 </dd>
2236 <dt class="hdlist1"><em>%&lt;( &lt;N&gt; [,trunc|ltrunc|mtrunc])</em></dt>
2237 <dd>
2238 <p>make the next placeholder take at
2239 least N column widths, padding spaces on
2240 the right if necessary. Optionally
2241 truncate (with ellipsis <em>..</em>) at the left (ltrunc) <code>..</code><code>ft</code>,
2242 the middle (mtrunc) <code>mi</code><code>..</code><code>le</code>, or the end
2243 (trunc) <code>rig..</code>, if the output is longer than
2244 N columns.
2245 Note 1: that truncating
2246 only works correctly with N &gt;= 2.
2247 Note 2: spaces around the N and M (see below)
2248 values are optional.
2249 Note 3: Emojis and other wide characters
2250 will take two display columns, which may
2251 over-run column boundaries.
2252 Note 4: decomposed character combining marks
2253 may be misplaced at padding boundaries.</p>
2254 </dd>
2255 <dt class="hdlist1"><em>%&lt;|( &lt;M&gt; )</em></dt>
2256 <dd>
2257 <p>make the next placeholder take at least until Mth
2258 display column, padding spaces on the right if necessary.
2259 Use negative M values for column positions measured
2260 from the right hand edge of the terminal window.</p>
2261 </dd>
2262 <dt class="hdlist1"><em>%&gt;( &lt;N&gt; )</em>, <em>%&gt;|( &lt;M&gt; )</em></dt>
2263 <dd>
2264 <p>similar to <em>%&lt;( &lt;N&gt; )</em>, <em>%&lt;|( &lt;M&gt; )</em> respectively,
2265 but padding spaces on the left</p>
2266 </dd>
2267 <dt class="hdlist1"><em>%&gt;&gt;( &lt;N&gt; )</em>, <em>%&gt;&gt;|( &lt;M&gt; )</em></dt>
2268 <dd>
2269 <p>similar to <em>%&gt;( &lt;N&gt; )</em>, <em>%&gt;|( &lt;M&gt; )</em>
2270 respectively, except that if the next
2271 placeholder takes more spaces than given and
2272 there are spaces on its left, use those
2273 spaces</p>
2274 </dd>
2275 <dt class="hdlist1"><em>%&gt;&lt;( &lt;N&gt; )</em>, <em>%&gt;&lt;|( &lt;M&gt; )</em></dt>
2276 <dd>
2277 <p>similar to <em>%&lt;( &lt;N&gt; )</em>, <em>%&lt;|( &lt;M&gt; )</em>
2278 respectively, but padding both sides
2279 (i.e. the text is centered)</p>
2280 </dd>
2281 </dl>
2282 </div>
2283 </li>
2284 <li>
2285 <p>Placeholders that expand to information extracted from the commit:</p>
2286 <div class="dlist">
2287 <dl>
2288 <dt class="hdlist1"><em>%H</em></dt>
2289 <dd>
2290 <p>commit hash</p>
2291 </dd>
2292 <dt class="hdlist1"><em>%h</em></dt>
2293 <dd>
2294 <p>abbreviated commit hash</p>
2295 </dd>
2296 <dt class="hdlist1"><em>%T</em></dt>
2297 <dd>
2298 <p>tree hash</p>
2299 </dd>
2300 <dt class="hdlist1"><em>%t</em></dt>
2301 <dd>
2302 <p>abbreviated tree hash</p>
2303 </dd>
2304 <dt class="hdlist1"><em>%P</em></dt>
2305 <dd>
2306 <p>parent hashes</p>
2307 </dd>
2308 <dt class="hdlist1"><em>%p</em></dt>
2309 <dd>
2310 <p>abbreviated parent hashes</p>
2311 </dd>
2312 <dt class="hdlist1"><em>%an</em></dt>
2313 <dd>
2314 <p>author name</p>
2315 </dd>
2316 <dt class="hdlist1"><em>%aN</em></dt>
2317 <dd>
2318 <p>author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2319 or <a href="git-blame.html">git-blame(1)</a>)</p>
2320 </dd>
2321 <dt class="hdlist1"><em>%ae</em></dt>
2322 <dd>
2323 <p>author email</p>
2324 </dd>
2325 <dt class="hdlist1"><em>%aE</em></dt>
2326 <dd>
2327 <p>author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2328 or <a href="git-blame.html">git-blame(1)</a>)</p>
2329 </dd>
2330 <dt class="hdlist1"><em>%al</em></dt>
2331 <dd>
2332 <p>author email local-part (the part before the <em>@</em> sign)</p>
2333 </dd>
2334 <dt class="hdlist1"><em>%aL</em></dt>
2335 <dd>
2336 <p>author local-part (see <em>%al</em>) respecting .mailmap, see
2337 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2338 </dd>
2339 <dt class="hdlist1"><em>%ad</em></dt>
2340 <dd>
2341 <p>author date (format respects --date= option)</p>
2342 </dd>
2343 <dt class="hdlist1"><em>%aD</em></dt>
2344 <dd>
2345 <p>author date, RFC2822 style</p>
2346 </dd>
2347 <dt class="hdlist1"><em>%ar</em></dt>
2348 <dd>
2349 <p>author date, relative</p>
2350 </dd>
2351 <dt class="hdlist1"><em>%at</em></dt>
2352 <dd>
2353 <p>author date, UNIX timestamp</p>
2354 </dd>
2355 <dt class="hdlist1"><em>%ai</em></dt>
2356 <dd>
2357 <p>author date, ISO 8601-like format</p>
2358 </dd>
2359 <dt class="hdlist1"><em>%aI</em></dt>
2360 <dd>
2361 <p>author date, strict ISO 8601 format</p>
2362 </dd>
2363 <dt class="hdlist1"><em>%as</em></dt>
2364 <dd>
2365 <p>author date, short format (<code>YYYY-MM-DD</code>)</p>
2366 </dd>
2367 <dt class="hdlist1"><em>%ah</em></dt>
2368 <dd>
2369 <p>author date, human style (like the <code>--date=human</code> option of
2370 <a href="git-rev-list.html">git-rev-list(1)</a>)</p>
2371 </dd>
2372 <dt class="hdlist1"><em>%cn</em></dt>
2373 <dd>
2374 <p>committer name</p>
2375 </dd>
2376 <dt class="hdlist1"><em>%cN</em></dt>
2377 <dd>
2378 <p>committer name (respecting .mailmap, see
2379 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2380 </dd>
2381 <dt class="hdlist1"><em>%ce</em></dt>
2382 <dd>
2383 <p>committer email</p>
2384 </dd>
2385 <dt class="hdlist1"><em>%cE</em></dt>
2386 <dd>
2387 <p>committer email (respecting .mailmap, see
2388 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2389 </dd>
2390 <dt class="hdlist1"><em>%cl</em></dt>
2391 <dd>
2392 <p>committer email local-part (the part before the <em>@</em> sign)</p>
2393 </dd>
2394 <dt class="hdlist1"><em>%cL</em></dt>
2395 <dd>
2396 <p>committer local-part (see <em>%cl</em>) respecting .mailmap, see
2397 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2398 </dd>
2399 <dt class="hdlist1"><em>%cd</em></dt>
2400 <dd>
2401 <p>committer date (format respects --date= option)</p>
2402 </dd>
2403 <dt class="hdlist1"><em>%cD</em></dt>
2404 <dd>
2405 <p>committer date, RFC2822 style</p>
2406 </dd>
2407 <dt class="hdlist1"><em>%cr</em></dt>
2408 <dd>
2409 <p>committer date, relative</p>
2410 </dd>
2411 <dt class="hdlist1"><em>%ct</em></dt>
2412 <dd>
2413 <p>committer date, UNIX timestamp</p>
2414 </dd>
2415 <dt class="hdlist1"><em>%ci</em></dt>
2416 <dd>
2417 <p>committer date, ISO 8601-like format</p>
2418 </dd>
2419 <dt class="hdlist1"><em>%cI</em></dt>
2420 <dd>
2421 <p>committer date, strict ISO 8601 format</p>
2422 </dd>
2423 <dt class="hdlist1"><em>%cs</em></dt>
2424 <dd>
2425 <p>committer date, short format (<code>YYYY-MM-DD</code>)</p>
2426 </dd>
2427 <dt class="hdlist1"><em>%ch</em></dt>
2428 <dd>
2429 <p>committer date, human style (like the <code>--date=human</code> option of
2430 <a href="git-rev-list.html">git-rev-list(1)</a>)</p>
2431 </dd>
2432 <dt class="hdlist1"><em>%d</em></dt>
2433 <dd>
2434 <p>ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a></p>
2435 </dd>
2436 <dt class="hdlist1"><em>%D</em></dt>
2437 <dd>
2438 <p>ref names without the " (", ")" wrapping.</p>
2439 </dd>
2440 <dt class="hdlist1"><em>%(decorate[:&lt;options&gt;])</em></dt>
2441 <dd>
2442 <p>ref names with custom decorations. The <code>decorate</code> string may be followed by a
2443 colon and zero or more comma-separated options. Option values may contain
2444 literal formatting codes. These must be used for commas (%x2C) and closing
2445 parentheses (%x29), due to their role in the option syntax.</p>
2446 <div class="ulist">
2447 <ul>
2448 <li>
2449 <p><em>prefix=&lt;value&gt;</em>: Shown before the list of ref names. Defaults to "&#160;(".</p>
2450 </li>
2451 <li>
2452 <p><em>suffix=&lt;value&gt;</em>: Shown after the list of ref names. Defaults to ")".</p>
2453 </li>
2454 <li>
2455 <p><em>separator=&lt;value&gt;</em>: Shown between ref names. Defaults to "<code>,</code>&#160;".</p>
2456 </li>
2457 <li>
2458 <p><em>pointer=&lt;value&gt;</em>: Shown between HEAD and the branch it points to, if any.
2459 Defaults to "&#160;<code>-</code>&gt;&#160;".</p>
2460 </li>
2461 <li>
2462 <p><em>tag=&lt;value&gt;</em>: Shown before tag names. Defaults to "<code>tag:</code>&#160;".</p>
2463 </li>
2464 </ul>
2465 </div>
2466 </dd>
2467 </dl>
2468 </div>
2469 </li>
2470 </ul>
2471 </div>
2472 <div class="paragraph">
2473 <p>For example, to produce decorations with no wrapping
2474 or tag annotations, and spaces as separators:</p>
2475 </div>
2476 <div class="paragraph">
2477 <p>+
2478 %(<code>decorate:prefix=,suffix=,tag=,separator=</code> )</p>
2479 </div>
2480 <div class="dlist">
2481 <dl>
2482 <dt class="hdlist1"><em>%(describe[:&lt;options&gt;])</em></dt>
2483 <dd>
2484 <p>human-readable name, like <a href="git-describe.html">git-describe(1)</a>; empty string for
2485 undescribable commits. The <code>describe</code> string may be followed by a colon and
2486 zero or more comma-separated options. Descriptions can be inconsistent when
2487 tags are added or removed at the same time.</p>
2488 <div class="ulist">
2489 <ul>
2490 <li>
2491 <p><em>tags[=&lt;bool-value&gt;]</em>: Instead of only considering annotated tags,
2492 consider lightweight tags as well.</p>
2493 </li>
2494 <li>
2495 <p><em>abbrev=&lt;number&gt;</em>: Instead of using the default number of hexadecimal digits
2496 (which will vary according to the number of objects in the repository with a
2497 default of 7) of the abbreviated object name, use &lt;number&gt; digits, or as many
2498 digits as needed to form a unique object name.</p>
2499 </li>
2500 <li>
2501 <p><em>match=&lt;pattern&gt;</em>: Only consider tags matching the given
2502 <code>glob</code>(<code>7</code>) pattern, excluding the "refs/tags/" prefix.</p>
2503 </li>
2504 <li>
2505 <p><em>exclude=&lt;pattern&gt;</em>: Do not consider tags matching the given
2506 <code>glob</code>(<code>7</code>) pattern, excluding the "refs/tags/" prefix.</p>
2507 </li>
2508 </ul>
2509 </div>
2510 </dd>
2511 <dt class="hdlist1"><em>%S</em></dt>
2512 <dd>
2513 <p>ref name given on the command line by which the commit was reached
2514 (like <code>git</code> <code>log</code> <code>--source</code>), only works with <code>git</code> <code>log</code></p>
2515 </dd>
2516 <dt class="hdlist1"><em>%e</em></dt>
2517 <dd>
2518 <p>encoding</p>
2519 </dd>
2520 <dt class="hdlist1"><em>%s</em></dt>
2521 <dd>
2522 <p>subject</p>
2523 </dd>
2524 <dt class="hdlist1"><em>%f</em></dt>
2525 <dd>
2526 <p>sanitized subject line, suitable for a filename</p>
2527 </dd>
2528 <dt class="hdlist1"><em>%b</em></dt>
2529 <dd>
2530 <p>body</p>
2531 </dd>
2532 <dt class="hdlist1"><em>%B</em></dt>
2533 <dd>
2534 <p>raw body (unwrapped subject and body)</p>
2535 </dd>
2536 <dt class="hdlist1"><em>%N</em></dt>
2537 <dd>
2538 <p>commit notes</p>
2539 </dd>
2540 <dt class="hdlist1"><em>%GG</em></dt>
2541 <dd>
2542 <p>raw verification message from GPG for a signed commit</p>
2543 </dd>
2544 <dt class="hdlist1"><em>%G?</em></dt>
2545 <dd>
2546 <p>show "G" for a good (valid) signature,
2547 "B" for a bad signature,
2548 "U" for a good signature with unknown validity,
2549 "X" for a good signature that has expired,
2550 "Y" for a good signature made by an expired key,
2551 "R" for a good signature made by a revoked key,
2552 "E" if the signature cannot be checked (e.g. missing key)
2553 and "N" for no signature</p>
2554 </dd>
2555 <dt class="hdlist1"><em>%GS</em></dt>
2556 <dd>
2557 <p>show the name of the signer for a signed commit</p>
2558 </dd>
2559 <dt class="hdlist1"><em>%GK</em></dt>
2560 <dd>
2561 <p>show the key used to sign a signed commit</p>
2562 </dd>
2563 <dt class="hdlist1"><em>%GF</em></dt>
2564 <dd>
2565 <p>show the fingerprint of the key used to sign a signed commit</p>
2566 </dd>
2567 <dt class="hdlist1"><em>%GP</em></dt>
2568 <dd>
2569 <p>show the fingerprint of the primary key whose subkey was used
2570 to sign a signed commit</p>
2571 </dd>
2572 <dt class="hdlist1"><em>%GT</em></dt>
2573 <dd>
2574 <p>show the trust level for the key used to sign a signed commit</p>
2575 </dd>
2576 <dt class="hdlist1"><em>%gD</em></dt>
2577 <dd>
2578 <p>reflog selector, e.g., <code>refs/stash@</code>{1} or <code>refs/stash@</code>{2
2579 <code>minutes</code> <code>ago</code>}; the format follows the rules described for the
2580 <code>-g</code> option. The portion before the <code>@</code> is the refname as
2581 given on the command line (so <code>git</code> <code>log</code> <code>-g</code> <code>refs/heads/master</code>
2582 would yield <code>refs/heads/master@</code>{0}).</p>
2583 </dd>
2584 <dt class="hdlist1"><em>%gd</em></dt>
2585 <dd>
2586 <p>shortened reflog selector; same as %gD, but the refname
2587 portion is shortened for human readability (so
2588 <code>refs/heads/master</code> becomes just <code>master</code>).</p>
2589 </dd>
2590 <dt class="hdlist1"><em>%gn</em></dt>
2591 <dd>
2592 <p>reflog identity name</p>
2593 </dd>
2594 <dt class="hdlist1"><em>%gN</em></dt>
2595 <dd>
2596 <p>reflog identity name (respecting .mailmap, see
2597 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2598 </dd>
2599 <dt class="hdlist1"><em>%ge</em></dt>
2600 <dd>
2601 <p>reflog identity email</p>
2602 </dd>
2603 <dt class="hdlist1"><em>%gE</em></dt>
2604 <dd>
2605 <p>reflog identity email (respecting .mailmap, see
2606 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)</p>
2607 </dd>
2608 <dt class="hdlist1"><em>%gs</em></dt>
2609 <dd>
2610 <p>reflog subject</p>
2611 </dd>
2612 <dt class="hdlist1"><em>%(trailers[:&lt;options&gt;])</em></dt>
2613 <dd>
2614 <p>display the trailers of the body as interpreted by
2615 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>. The <code>trailers</code> string may be followed by
2616 a colon and zero or more comma-separated options. If any option is provided
2617 multiple times, the last occurrence wins.</p>
2618 <div class="ulist">
2619 <ul>
2620 <li>
2621 <p><em>key=&lt;key&gt;</em>: only show trailers with specified &lt;key&gt;. Matching is done
2622 case-insensitively and trailing colon is optional. If option is
2623 given multiple times trailer lines matching any of the keys are
2624 shown. This option automatically enables the <code>only</code> option so that
2625 non-trailer lines in the trailer block are hidden. If that is not
2626 desired it can be disabled with <code>only=false</code>. E.g.,
2627 %(<code>trailers:key=Reviewed-by</code>) shows trailer lines with key
2628 <code>Reviewed-by</code>.</p>
2629 </li>
2630 <li>
2631 <p><em>only[=&lt;bool&gt;]</em>: select whether non-trailer lines from the trailer
2632 block should be included.</p>
2633 </li>
2634 <li>
2635 <p><em>separator=&lt;sep&gt;</em>: specify the separator inserted between trailer
2636 lines. Defaults to a line feed character. The string &lt;sep&gt; may contain
2637 the literal formatting codes described above. To use comma as
2638 separator one must use %x2C as it would otherwise be parsed as
2639 next option. E.g., %(<code>trailers:key=Ticket,separator=</code>%x2C )
2640 shows all trailer lines whose key is "Ticket" separated by a comma
2641 and a space.</p>
2642 </li>
2643 <li>
2644 <p><em>unfold[=&lt;bool&gt;]</em>: make it behave as if interpret-trailer&#8217;s <code>--unfold</code>
2645 option was given. E.g.,
2646 %(<code>trailers:only,unfold=true</code>) unfolds and shows all trailer lines.</p>
2647 </li>
2648 <li>
2649 <p><em>keyonly[=&lt;bool&gt;]</em>: only show the key part of the trailer.</p>
2650 </li>
2651 <li>
2652 <p><em>valueonly[=&lt;bool&gt;]</em>: only show the value part of the trailer.</p>
2653 </li>
2654 <li>
2655 <p><em>key_value_separator=&lt;sep&gt;</em>: specify the separator inserted between
2656 the key and value of each trailer. Defaults to ": ". Otherwise it
2657 shares the same semantics as <em>separator=&lt;sep&gt;</em> above.</p>
2658 </li>
2659 </ul>
2660 </div>
2661 </dd>
2662 </dl>
2663 </div>
2664 </li>
2665 </ul>
2666 </div>
2667 <div class="admonitionblock note">
2668 <table>
2669 <tr>
2670 <td class="icon">
2671 <div class="title">Note</div>
2672 </td>
2673 <td class="content">
2674 Some placeholders may depend on other options given to the
2675 revision traversal engine. For example, the %g* reflog options will
2676 insert an empty string unless we are traversing reflog entries (e.g., by
2677 <code>git</code> <code>log</code> <code>-g</code>). The %d and %D placeholders will use the "short"
2678 decoration format if <code>--decorate</code> was not already provided on the command
2679 line.
2680 </td>
2681 </tr>
2682 </table>
2683 </div>
2684 <div class="paragraph">
2685 <p>The boolean options accept an optional value [<code>=</code><em>&lt;bool-value&gt;</em>]. The values
2686 <code>true</code>, <code>false</code>, <code>on</code>, <code>off</code> etc. are all accepted. See the "boolean"
2687 sub-section in "EXAMPLES" in <a href="git-config.html">git-config(1)</a>. If a boolean
2688 option is given with no value, it&#8217;s enabled.</p>
2689 </div>
2690 <div class="paragraph">
2691 <p>If you add a <code>+</code> (plus sign) after <em>%</em> of a placeholder, a line-feed
2692 is inserted immediately before the expansion if and only if the
2693 placeholder expands to a non-empty string.</p>
2694 </div>
2695 <div class="paragraph">
2696 <p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, all consecutive
2697 line-feeds immediately preceding the expansion are deleted if and only if the
2698 placeholder expands to an empty string.</p>
2699 </div>
2700 <div class="paragraph">
2701 <p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
2702 is inserted immediately before the expansion if and only if the
2703 placeholder expands to a non-empty string.</p>
2704 </div>
2705 <div class="ulist">
2706 <ul>
2707 <li>
2708 <p><em>tformat:</em></p>
2709 <div class="paragraph">
2710 <p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
2711 provides "terminator" semantics instead of "separator" semantics. In
2712 other words, each commit has the message terminator character (usually a
2713 newline) appended, rather than a separator placed between entries.
2714 This means that the final entry of a single-line format will be properly
2715 terminated with a new line, just as the "oneline" format does.
2716 For example:</p>
2717 </div>
2718 <div class="listingblock">
2719 <div class="content">
2720 <pre>$ git log -2 --pretty=format:%h 4da45bef \
2721 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
2722 4da45be
2723 7134973 -- NO NEWLINE
2725 $ git log -2 --pretty=tformat:%h 4da45bef \
2726 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
2727 4da45be
2728 7134973</pre>
2729 </div>
2730 </div>
2731 <div class="paragraph">
2732 <p>In addition, any unrecognized string that has a % in it is interpreted
2733 as if it has <code>tformat:</code> in front of it. For example, these two are
2734 equivalent:</p>
2735 </div>
2736 <div class="listingblock">
2737 <div class="content">
2738 <pre>$ git log -2 --pretty=tformat:%h 4da45bef
2739 $ git log -2 --pretty=%h 4da45bef</pre>
2740 </div>
2741 </div>
2742 </li>
2743 </ul>
2744 </div>
2745 </div>
2746 </div>
2747 <div class="sect1">
2748 <h2 id="_diff_formatting">DIFF FORMATTING</h2>
2749 <div class="sectionbody">
2750 <div class="paragraph">
2751 <p>By default, <code>git</code> <code>log</code> does not generate any diff output. The options
2752 below can be used to show the changes made by each commit.</p>
2753 </div>
2754 <div class="paragraph">
2755 <p>Note that unless one of <code>--diff-merges</code> variants (including short
2756 <code>-m</code>, <code>-c</code>, <code>--cc</code>, and <code>--dd</code> options) is explicitly given, merge commits
2757 will not show a diff, even if a diff format like <code>--patch</code> is
2758 selected, nor will they match search options like <code>-S</code>. The exception
2759 is when <code>--first-parent</code> is in use, in which case <code>first-parent</code> is
2760 the default format for merge commits.</p>
2761 </div>
2762 <div class="dlist">
2763 <dl>
2764 <dt class="hdlist1"><code>-p</code></dt>
2765 <dt class="hdlist1"><code>-u</code></dt>
2766 <dt class="hdlist1"><code>--patch</code></dt>
2767 <dd>
2768 <p>Generate patch (see <a href="#generate_patch_text_with_p">Generating patch text with -p</a>).</p>
2769 </dd>
2770 <dt class="hdlist1"><code>-s</code></dt>
2771 <dt class="hdlist1"><code>--no-patch</code></dt>
2772 <dd>
2773 <p>Suppress all output from the diff machinery. Useful for
2774 commands like <code>git</code> <code>show</code> that show the patch by default to
2775 squelch their output, or to cancel the effect of options like
2776 <code>--patch</code>, <code>--stat</code> earlier on the command line in an alias.</p>
2777 </dd>
2778 <dt class="hdlist1">-m</dt>
2779 <dd>
2780 <p>Show diffs for merge commits in the default format. This is
2781 similar to <code>--diff-merges=on</code>, except <code>-m</code> will
2782 produce no output unless <code>-p</code> is given as well.</p>
2783 </dd>
2784 <dt class="hdlist1">-c</dt>
2785 <dd>
2786 <p>Produce combined diff output for merge commits.
2787 Shortcut for <code>--diff-merges=combined</code> <code>-p</code>.</p>
2788 </dd>
2789 <dt class="hdlist1">--cc</dt>
2790 <dd>
2791 <p>Produce dense combined diff output for merge commits.
2792 Shortcut for <code>--diff-merges=dense-combined</code> <code>-p</code>.</p>
2793 </dd>
2794 <dt class="hdlist1">--dd</dt>
2795 <dd>
2796 <p>Produce diff with respect to first parent for both merge and
2797 regular commits.
2798 Shortcut for <code>--diff-merges=first-parent</code> <code>-p</code>.</p>
2799 </dd>
2800 <dt class="hdlist1">--remerge-diff</dt>
2801 <dd>
2802 <p>Produce remerge-diff output for merge commits.
2803 Shortcut for <code>--diff-merges=remerge</code> <code>-p</code>.</p>
2804 </dd>
2805 <dt class="hdlist1">--no-diff-merges</dt>
2806 <dd>
2807 <p>Synonym for <code>--diff-merges=off</code>.</p>
2808 </dd>
2809 <dt class="hdlist1">--diff-merges=&lt;format&gt;</dt>
2810 <dd>
2811 <p>Specify diff format to be used for merge commits. Default is
2812 `off` unless <code>--first-parent</code> is in use, in
2813 which case <code>first-parent</code> is the default.</p>
2814 <div class="paragraph">
2815 <p>The following formats are supported:</p>
2816 </div>
2817 <div class="openblock">
2818 <div class="content">
2819 <div class="dlist">
2820 <dl>
2821 <dt class="hdlist1">off, none</dt>
2822 <dd>
2823 <p>Disable output of diffs for merge commits. Useful to override
2824 implied value.</p>
2825 </dd>
2826 <dt class="hdlist1">on, m</dt>
2827 <dd>
2828 <p>Make diff output for merge commits to be shown in the default
2829 format. The default format can be changed using
2830 <code>log.diffMerges</code> configuration variable, whose default value
2831 is <code>separate</code>.</p>
2832 </dd>
2833 <dt class="hdlist1">first-parent, 1</dt>
2834 <dd>
2835 <p>Show full diff with respect to first parent. This is the same
2836 format as <code>--patch</code> produces for non-merge commits.</p>
2837 </dd>
2838 <dt class="hdlist1">separate</dt>
2839 <dd>
2840 <p>Show full diff with respect to each of parents.
2841 Separate log entry and diff is generated for each parent.</p>
2842 </dd>
2843 <dt class="hdlist1">combined, c</dt>
2844 <dd>
2845 <p>Show differences from each of the parents to the merge
2846 result simultaneously instead of showing pairwise diff between
2847 a parent and the result one at a time. Furthermore, it lists
2848 only files which were modified from all parents.</p>
2849 </dd>
2850 <dt class="hdlist1">dense-combined, cc</dt>
2851 <dd>
2852 <p>Further compress output produced by <code>--diff-merges=combined</code>
2853 by omitting uninteresting hunks whose contents in the parents
2854 have only two variants and the merge result picks one of them
2855 without modification.</p>
2856 </dd>
2857 <dt class="hdlist1">remerge, r</dt>
2858 <dd>
2859 <p>Remerge two-parent merge commits to create a temporary tree
2860 object&#8212;&#8203;potentially containing files with conflict markers
2861 and such. A diff is then shown between that temporary tree
2862 and the actual merge commit.</p>
2863 <div class="paragraph">
2864 <p>The output emitted when this option is used is subject to change, and
2865 so is its interaction with other options (unless explicitly
2866 documented).</p>
2867 </div>
2868 </dd>
2869 </dl>
2870 </div>
2871 </div>
2872 </div>
2873 </dd>
2874 <dt class="hdlist1">--combined-all-paths</dt>
2875 <dd>
2876 <p>Cause combined diffs (used for merge commits) to
2877 list the name of the file from all parents. It thus only has
2878 effect when <code>--diff-merges=</code>[<code>dense-</code>]<code>combined</code> is in use, and
2879 is likely only useful if filename changes are detected (i.e.
2880 when either rename or copy detection have been requested).</p>
2881 </dd>
2882 <dt class="hdlist1"><code>-U</code><em>&lt;n&gt;</em></dt>
2883 <dt class="hdlist1"><code>--unified=</code><em>&lt;n&gt;</em></dt>
2884 <dd>
2885 <p>Generate diffs with <em>&lt;n&gt;</em> lines of context instead of
2886 the usual three.
2887 Implies <code>--patch</code>.</p>
2888 </dd>
2889 <dt class="hdlist1"><code>--output=</code><em>&lt;file&gt;</em></dt>
2890 <dd>
2891 <p>Output to a specific file instead of stdout.</p>
2892 </dd>
2893 <dt class="hdlist1"><code>--output-indicator-new=</code><em>&lt;char&gt;</em></dt>
2894 <dt class="hdlist1"><code>--output-indicator-old=</code><em>&lt;char&gt;</em></dt>
2895 <dt class="hdlist1"><code>--output-indicator-context=</code><em>&lt;char&gt;</em></dt>
2896 <dd>
2897 <p>Specify the character used to indicate new, old or context
2898 lines in the generated patch. Normally they are <code>+</code>, <code>-</code> and
2899 ' ' respectively.</p>
2900 </dd>
2901 <dt class="hdlist1"><code>--raw</code></dt>
2902 <dd>
2903 <p>For each commit, show a summary of changes using the raw diff
2904 format. See the "RAW OUTPUT FORMAT" section of
2905 <a href="git-diff.html">git-diff(1)</a>. This is different from showing the log
2906 itself in raw format, which you can achieve with
2907 <code>--format=raw</code>.</p>
2908 </dd>
2909 <dt class="hdlist1"><code>--patch-with-raw</code></dt>
2910 <dd>
2911 <p>Synonym for <code>-p</code> <code>--raw</code>.</p>
2912 </dd>
2913 <dt class="hdlist1"><code>-t</code></dt>
2914 <dd>
2915 <p>Show the tree objects in the diff output.</p>
2916 </dd>
2917 <dt class="hdlist1"><code>--indent-heuristic</code></dt>
2918 <dd>
2919 <p>Enable the heuristic that shifts diff hunk boundaries to make patches
2920 easier to read. This is the default.</p>
2921 </dd>
2922 <dt class="hdlist1"><code>--no-indent-heuristic</code></dt>
2923 <dd>
2924 <p>Disable the indent heuristic.</p>
2925 </dd>
2926 <dt class="hdlist1"><code>--minimal</code></dt>
2927 <dd>
2928 <p>Spend extra time to make sure the smallest possible
2929 diff is produced.</p>
2930 </dd>
2931 <dt class="hdlist1"><code>--patience</code></dt>
2932 <dd>
2933 <p>Generate a diff using the "patience diff" algorithm.</p>
2934 </dd>
2935 <dt class="hdlist1"><code>--histogram</code></dt>
2936 <dd>
2937 <p>Generate a diff using the "histogram diff" algorithm.</p>
2938 </dd>
2939 <dt class="hdlist1"><code>--anchored=</code><em>&lt;text&gt;</em></dt>
2940 <dd>
2941 <p>Generate a diff using the "anchored diff" algorithm.</p>
2942 <div class="paragraph">
2943 <p>This option may be specified more than once.</p>
2944 </div>
2945 <div class="paragraph">
2946 <p>If a line exists in both the source and destination, exists only once,
2947 and starts with <em>&lt;text&gt;</em>, this algorithm attempts to prevent it from
2948 appearing as a deletion or addition in the output. It uses the "patience
2949 diff" algorithm internally.</p>
2950 </div>
2951 </dd>
2952 <dt class="hdlist1"><code>--diff-algorithm=</code>(<code>patience</code>|<code>minimal</code>|<code>histogram</code>|<code>myers</code>)</dt>
2953 <dd>
2954 <p>Choose a diff algorithm. The variants are as follows:</p>
2955 <div class="openblock">
2956 <div class="content">
2957 <div class="dlist">
2958 <dl>
2959 <dt class="hdlist1"><code>default</code></dt>
2960 <dt class="hdlist1"><code>myers</code></dt>
2961 <dd>
2962 <p>The basic greedy diff algorithm. Currently, this is the default.</p>
2963 </dd>
2964 <dt class="hdlist1"><code>minimal</code></dt>
2965 <dd>
2966 <p>Spend extra time to make sure the smallest possible diff is
2967 produced.</p>
2968 </dd>
2969 <dt class="hdlist1"><code>patience</code></dt>
2970 <dd>
2971 <p>Use "patience diff" algorithm when generating patches.</p>
2972 </dd>
2973 <dt class="hdlist1"><code>histogram</code></dt>
2974 <dd>
2975 <p>This algorithm extends the patience algorithm to "support
2976 low-occurrence common elements".</p>
2977 </dd>
2978 </dl>
2979 </div>
2980 </div>
2981 </div>
2982 <div class="paragraph">
2983 <p>For instance, if you configured the <code>diff.algorithm</code> variable to a
2984 non-default value and want to use the default one, then you
2985 have to use <code>--diff-algorithm=default</code> option.</p>
2986 </div>
2987 </dd>
2988 <dt class="hdlist1"><code>--stat</code>[<code>=</code><em>&lt;width&gt;</em>[<code>,</code><em>&lt;name-width&gt;</em>[<code>,</code><em>&lt;count&gt;</em>]]]</dt>
2989 <dd>
2990 <p>Generate a diffstat. By default, as much space as necessary
2991 will be used for the filename part, and the rest for the graph
2992 part. Maximum width defaults to terminal width, or 80 columns
2993 if not connected to a terminal, and can be overridden by
2994 <em>&lt;width&gt;</em>. The width of the filename part can be limited by
2995 giving another width <em>&lt;name-width&gt;</em> after a comma or by setting
2996 <code>diff.statNameWidth=</code><em>&lt;name-width&gt;</em>. The width of the graph part can be
2997 limited by using <code>--stat-graph-width=</code><em>&lt;graph-width&gt;</em> or by setting
2998 <code>diff.statGraphWidth=</code><em>&lt;graph-width&gt;</em>. Using <code>--stat</code> or
2999 <code>--stat-graph-width</code> affects all commands generating a stat graph,
3000 while setting <code>diff.statNameWidth</code> or <code>diff.statGraphWidth</code>
3001 does not affect <code>git</code> <code>format-patch</code>.
3002 By giving a third parameter <em>&lt;count&gt;</em>, you can limit the output to
3003 the first <em>&lt;count&gt;</em> lines, followed by ... if there are more.</p>
3004 <div class="paragraph">
3005 <p>These parameters can also be set individually with <code>--stat-width=</code><em>&lt;width&gt;</em>,
3006 <code>--stat-name-width=</code><em>&lt;name-width&gt;</em> and <code>--stat-count=</code><em>&lt;count&gt;</em>.</p>
3007 </div>
3008 </dd>
3009 <dt class="hdlist1"><code>--compact-summary</code></dt>
3010 <dd>
3011 <p>Output a condensed summary of extended header information such
3012 as file creations or deletions ("new" or "gone", optionally <code>+l</code>
3013 if it&#8217;s a symlink) and mode changes (<code>+x</code> or <code>-x</code> for adding
3014 or removing executable bit respectively) in diffstat. The
3015 information is put between the filename part and the graph
3016 part. Implies <code>--stat</code>.</p>
3017 </dd>
3018 <dt class="hdlist1"><code>--numstat</code></dt>
3019 <dd>
3020 <p>Similar to <code>--stat</code>, but shows number of added and
3021 deleted lines in decimal notation and pathname without
3022 abbreviation, to make it more machine friendly. For
3023 binary files, outputs two <code>-</code> instead of saying
3024 <code>0</code> <code>0</code>.</p>
3025 </dd>
3026 <dt class="hdlist1"><code>--shortstat</code></dt>
3027 <dd>
3028 <p>Output only the last line of the <code>--stat</code> format containing total
3029 number of modified files, as well as number of added and deleted
3030 lines.</p>
3031 </dd>
3032 <dt class="hdlist1"><code>-X</code> [<em>&lt;param&gt;</em><code>,..</code>.]</dt>
3033 <dt class="hdlist1"><code>--dirstat</code>[<code>=</code><em>&lt;param&gt;</em><code>,..</code>.]</dt>
3034 <dd>
3035 <p>Output the distribution of relative amount of changes for each
3036 sub-directory. The behavior of <code>--dirstat</code> can be customized by
3037 passing it a comma separated list of parameters.
3038 The defaults are controlled by the <code>diff.dirstat</code> configuration
3039 variable (see <a href="git-config.html">git-config(1)</a>).
3040 The following parameters are available:</p>
3041 <div class="openblock">
3042 <div class="content">
3043 <div class="dlist">
3044 <dl>
3045 <dt class="hdlist1"><code>changes</code></dt>
3046 <dd>
3047 <p>Compute the dirstat numbers by counting the lines that have been
3048 removed from the source, or added to the destination. This ignores
3049 the amount of pure code movements within a file. In other words,
3050 rearranging lines in a file is not counted as much as other changes.
3051 This is the default behavior when no parameter is given.</p>
3052 </dd>
3053 <dt class="hdlist1"><code>lines</code></dt>
3054 <dd>
3055 <p>Compute the dirstat numbers by doing the regular line-based diff
3056 analysis, and summing the removed/added line counts. (For binary
3057 files, count 64-byte chunks instead, since binary files have no
3058 natural concept of lines). This is a more expensive <code>--dirstat</code>
3059 behavior than the <code>changes</code> behavior, but it does count rearranged
3060 lines within a file as much as other changes. The resulting output
3061 is consistent with what you get from the other <code>--</code>*stat options.</p>
3062 </dd>
3063 <dt class="hdlist1"><code>files</code></dt>
3064 <dd>
3065 <p>Compute the dirstat numbers by counting the number of files changed.
3066 Each changed file counts equally in the dirstat analysis. This is
3067 the computationally cheapest <code>--dirstat</code> behavior, since it does
3068 not have to look at the file contents at all.</p>
3069 </dd>
3070 <dt class="hdlist1"><code>cumulative</code></dt>
3071 <dd>
3072 <p>Count changes in a child directory for the parent directory as well.
3073 Note that when using <code>cumulative</code>, the sum of the percentages
3074 reported may exceed 100%. The default (non-cumulative) behavior can
3075 be specified with the <code>noncumulative</code> parameter.</p>
3076 </dd>
3077 <dt class="hdlist1"><em>&lt;limit&gt;</em></dt>
3078 <dd>
3079 <p>An integer parameter specifies a cut-off percent (3% by default).
3080 Directories contributing less than this percentage of the changes
3081 are not shown in the output.</p>
3082 </dd>
3083 </dl>
3084 </div>
3085 </div>
3086 </div>
3087 <div class="paragraph">
3088 <p>Example: The following will count changed files, while ignoring
3089 directories with less than 10% of the total amount of changed files,
3090 and accumulating child directory counts in the parent directories:
3091 <code>--dirstat=files,10,cumulative</code>.</p>
3092 </div>
3093 </dd>
3094 <dt class="hdlist1"><code>--cumulative</code></dt>
3095 <dd>
3096 <p>Synonym for <code>--dirstat=cumulative</code>.</p>
3097 </dd>
3098 <dt class="hdlist1"><code>--dirstat-by-file</code>[<code>=</code><em>&lt;param&gt;</em><code>,..</code>.]</dt>
3099 <dd>
3100 <p>Synonym for <code>--dirstat=files,</code><em>&lt;param&gt;</em><code>,..</code>..</p>
3101 </dd>
3102 <dt class="hdlist1"><code>--summary</code></dt>
3103 <dd>
3104 <p>Output a condensed summary of extended header information
3105 such as creations, renames and mode changes.</p>
3106 </dd>
3107 <dt class="hdlist1"><code>--patch-with-stat</code></dt>
3108 <dd>
3109 <p>Synonym for <code>-p</code> <code>--stat</code>.</p>
3110 </dd>
3111 <dt class="hdlist1"><code>-z</code></dt>
3112 <dd>
3113 <p>Separate the commits with <em>NUL</em>s instead of newlines.</p>
3114 <div class="paragraph">
3115 <p>Also, when <code>--raw</code> or <code>--numstat</code> has been given, do not munge
3116 pathnames and use <em>NUL</em>s as output field terminators.</p>
3117 </div>
3118 <div class="paragraph">
3119 <p>Without this option, pathnames with "unusual" characters are quoted as
3120 explained for the configuration variable <code>core.quotePath</code> (see
3121 <a href="git-config.html">git-config(1)</a>).</p>
3122 </div>
3123 </dd>
3124 <dt class="hdlist1"><code>--name-only</code></dt>
3125 <dd>
3126 <p>Show only the name of each changed file in the post-image tree.
3127 The file names are often encoded in UTF-8.
3128 For more information see the discussion about encoding in the <a href="git-log.html">git-log(1)</a>
3129 manual page.</p>
3130 </dd>
3131 <dt class="hdlist1"><code>--name-status</code></dt>
3132 <dd>
3133 <p>Show only the name(s) and status of each changed file. See the description
3134 of the <code>--diff-filter</code> option on what the status letters mean.
3135 Just like <code>--name-only</code> the file names are often encoded in UTF-8.</p>
3136 </dd>
3137 <dt class="hdlist1"><code>--submodule</code>[<code>=</code><em>&lt;format&gt;</em>]</dt>
3138 <dd>
3139 <p>Specify how differences in submodules are shown. When specifying
3140 <code>--submodule=short</code> the <code>short</code> format is used. This format just
3141 shows the names of the commits at the beginning and end of the range.
3142 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <code>log</code>
3143 format is used. This format lists the commits in the range like
3144 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
3145 is specified, the <code>diff</code> format is used. This format shows an
3146 inline diff of the changes in the submodule contents between the
3147 commit range. Defaults to <code>diff.submodule</code> or the <code>short</code> format
3148 if the config option is unset.</p>
3149 </dd>
3150 <dt class="hdlist1"><code>--color</code>[<code>=</code><em>&lt;when&gt;</em>]</dt>
3151 <dd>
3152 <p>Show colored diff.
3153 <code>--color</code> (i.e. without <code>=</code><em>&lt;when&gt;</em>) is the same as <code>--color=always</code>.
3154 <em>&lt;when&gt;</em> can be one of <code>always</code>, <code>never</code>, or <code>auto</code>.</p>
3155 </dd>
3156 <dt class="hdlist1"><code>--no-color</code></dt>
3157 <dd>
3158 <p>Turn off colored diff.
3159 It is the same as <code>--color=never</code>.</p>
3160 </dd>
3161 <dt class="hdlist1"><code>--color-moved</code>[<code>=</code><em>&lt;mode&gt;</em>]</dt>
3162 <dd>
3163 <p>Moved lines of code are colored differently.
3164 The <em>&lt;mode&gt;</em> defaults to <code>no</code> if the option is not given
3165 and to <code>zebra</code> if the option with no mode is given.
3166 The mode must be one of:</p>
3167 <div class="openblock">
3168 <div class="content">
3169 <div class="dlist">
3170 <dl>
3171 <dt class="hdlist1"><code>no</code></dt>
3172 <dd>
3173 <p>Moved lines are not highlighted.</p>
3174 </dd>
3175 <dt class="hdlist1"><code>default</code></dt>
3176 <dd>
3177 <p>Is a synonym for <code>zebra</code>. This may change to a more sensible mode
3178 in the future.</p>
3179 </dd>
3180 <dt class="hdlist1"><code>plain</code></dt>
3181 <dd>
3182 <p>Any line that is added in one location and was removed
3183 in another location will be colored with <code>color.diff.newMoved</code>.
3184 Similarly <code>color.diff.oldMoved</code> will be used for removed lines
3185 that are added somewhere else in the diff. This mode picks up any
3186 moved line, but it is not very useful in a review to determine
3187 if a block of code was moved without permutation.</p>
3188 </dd>
3189 <dt class="hdlist1"><code>blocks</code></dt>
3190 <dd>
3191 <p>Blocks of moved text of at least 20 alphanumeric characters
3192 are detected greedily. The detected blocks are
3193 painted using either the <code>color.diff.</code>(<code>old</code>|<code>new</code>)<code>Moved</code> color.
3194 Adjacent blocks cannot be told apart.</p>
3195 </dd>
3196 <dt class="hdlist1"><code>zebra</code></dt>
3197 <dd>
3198 <p>Blocks of moved text are detected as in <code>blocks</code> mode. The blocks
3199 are painted using either the <code>color.diff.</code>(<code>old</code>|<code>new</code>)<code>Moved</code> color or
3200 <code>color.diff.</code>(<code>old</code>|<code>new</code>)<code>MovedAlternative</code>. The change between
3201 the two colors indicates that a new block was detected.</p>
3202 </dd>
3203 <dt class="hdlist1"><code>dimmed-zebra</code></dt>
3204 <dd>
3205 <p>Similar to <code>zebra</code>, but additional dimming of uninteresting parts
3206 of moved code is performed. The bordering lines of two adjacent
3207 blocks are considered interesting, the rest is uninteresting.
3208 <code>dimmed_zebra</code> is a deprecated synonym.</p>
3209 </dd>
3210 </dl>
3211 </div>
3212 </div>
3213 </div>
3214 </dd>
3215 <dt class="hdlist1"><code>--no-color-moved</code></dt>
3216 <dd>
3217 <p>Turn off move detection. This can be used to override configuration
3218 settings. It is the same as <code>--color-moved=no</code>.</p>
3219 </dd>
3220 <dt class="hdlist1"><code>--color-moved-ws=</code><em>&lt;mode&gt;</em><code>,..</code>.</dt>
3221 <dd>
3222 <p>This configures how whitespace is ignored when performing the
3223 move detection for <code>--color-moved</code>.
3224 These modes can be given as a comma separated list:</p>
3225 <div class="openblock">
3226 <div class="content">
3227 <div class="dlist">
3228 <dl>
3229 <dt class="hdlist1"><code>no</code></dt>
3230 <dd>
3231 <p>Do not ignore whitespace when performing move detection.</p>
3232 </dd>
3233 <dt class="hdlist1"><code>ignore-space-at-eol</code></dt>
3234 <dd>
3235 <p>Ignore changes in whitespace at EOL.</p>
3236 </dd>
3237 <dt class="hdlist1"><code>ignore-space-change</code></dt>
3238 <dd>
3239 <p>Ignore changes in amount of whitespace. This ignores whitespace
3240 at line end, and considers all other sequences of one or
3241 more whitespace characters to be equivalent.</p>
3242 </dd>
3243 <dt class="hdlist1"><code>ignore-all-space</code></dt>
3244 <dd>
3245 <p>Ignore whitespace when comparing lines. This ignores differences
3246 even if one line has whitespace where the other line has none.</p>
3247 </dd>
3248 <dt class="hdlist1"><code>allow-indentation-change</code></dt>
3249 <dd>
3250 <p>Initially ignore any whitespace in the move detection, then
3251 group the moved code blocks only into a block if the change in
3252 whitespace is the same per line. This is incompatible with the
3253 other modes.</p>
3254 </dd>
3255 </dl>
3256 </div>
3257 </div>
3258 </div>
3259 </dd>
3260 <dt class="hdlist1"><code>--no-color-moved-ws</code></dt>
3261 <dd>
3262 <p>Do not ignore whitespace when performing move detection. This can be
3263 used to override configuration settings. It is the same as
3264 <code>--color-moved-ws=no</code>.</p>
3265 </dd>
3266 <dt class="hdlist1"><code>--word-diff</code>[<code>=</code><em>&lt;mode&gt;</em>]</dt>
3267 <dd>
3268 <p>By default, words are delimited by whitespace; see
3269 <code>--word-diff-regex</code> below. The <em>&lt;mode&gt;</em> defaults to <code>plain</code>, and
3270 must be one of:</p>
3271 <div class="openblock">
3272 <div class="content">
3273 <div class="dlist">
3274 <dl>
3275 <dt class="hdlist1"><code>color</code></dt>
3276 <dd>
3277 <p>Highlight changed words using only colors. Implies <code>--color</code>.</p>
3278 </dd>
3279 <dt class="hdlist1"><code>plain</code></dt>
3280 <dd>
3281 <p>Show words as [<code>-removed-</code>] and {<code>added</code>}. Makes no
3282 attempts to escape the delimiters if they appear in the input,
3283 so the output may be ambiguous.</p>
3284 </dd>
3285 <dt class="hdlist1"><code>porcelain</code></dt>
3286 <dd>
3287 <p>Use a special line-based format intended for script
3288 consumption. Added/removed/unchanged runs are printed in the
3289 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
3290 character at the beginning of the line and extending to the
3291 end of the line. Newlines in the input are represented by a
3292 tilde <code>~</code> on a line of its own.</p>
3293 </dd>
3294 <dt class="hdlist1"><code>none</code></dt>
3295 <dd>
3296 <p>Disable word diff again.</p>
3297 </dd>
3298 </dl>
3299 </div>
3300 </div>
3301 </div>
3302 <div class="paragraph">
3303 <p>Note that despite the name of the first mode, color is used to
3304 highlight the changed parts in all modes if enabled.</p>
3305 </div>
3306 </dd>
3307 <dt class="hdlist1"><code>--word-diff-regex=</code><em>&lt;regex&gt;</em></dt>
3308 <dd>
3309 <p>Use <em>&lt;regex&gt;</em> to decide what a word is, instead of considering
3310 runs of non-whitespace to be a word. Also implies
3311 <code>--word-diff</code> unless it was already enabled.</p>
3312 <div class="paragraph">
3313 <p>Every non-overlapping match of the
3314 <em>&lt;regex&gt;</em> is considered a word. Anything between these matches is
3315 considered whitespace and ignored(!) for the purposes of finding
3316 differences. You may want to append |[<code>^</code>[<code>:space:</code>]] to your regular
3317 expression to make sure that it matches all non-whitespace characters.
3318 A match that contains a newline is silently truncated(!) at the
3319 newline.</p>
3320 </div>
3321 <div class="paragraph">
3322 <p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
3323 and, correspondingly, show differences character by character.</p>
3324 </div>
3325 <div class="paragraph">
3326 <p>The regex can also be set via a diff driver or configuration option, see
3327 <a href="gitattributes.html">gitattributes(5)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly
3328 overrides any diff driver or configuration setting. Diff drivers
3329 override configuration settings.</p>
3330 </div>
3331 </dd>
3332 <dt class="hdlist1"><code>--color-words</code>[<code>=</code><em>&lt;regex&gt;</em>]</dt>
3333 <dd>
3334 <p>Equivalent to <code>--word-diff=color</code> plus (if a regex was
3335 specified) <code>--word-diff-regex=</code><em>&lt;regex&gt;</em>.</p>
3336 </dd>
3337 <dt class="hdlist1"><code>--no-renames</code></dt>
3338 <dd>
3339 <p>Turn off rename detection, even when the configuration
3340 file gives the default to do so.</p>
3341 </dd>
3342 <dt class="hdlist1"><code>--</code>[<code>no-</code>]<code>rename-empty</code></dt>
3343 <dd>
3344 <p>Whether to use empty blobs as rename source.</p>
3345 </dd>
3346 <dt class="hdlist1"><code>--check</code></dt>
3347 <dd>
3348 <p>Warn if changes introduce conflict markers or whitespace errors.
3349 What are considered whitespace errors is controlled by <code>core.whitespace</code>
3350 configuration. By default, trailing whitespaces (including
3351 lines that consist solely of whitespaces) and a space character
3352 that is immediately followed by a tab character inside the
3353 initial indent of the line are considered whitespace errors.
3354 Exits with non-zero status if problems are found. Not compatible
3355 with <code>--exit-code</code>.</p>
3356 </dd>
3357 <dt class="hdlist1"><code>--ws-error-highlight=</code><em>&lt;kind&gt;</em></dt>
3358 <dd>
3359 <p>Highlight whitespace errors in the <code>context</code>, <code>old</code> or <code>new</code>
3360 lines of the diff. Multiple values are separated by comma,
3361 <code>none</code> resets previous values, <code>default</code> reset the list to
3362 <code>new</code> and <code>all</code> is a shorthand for <code>old,new,context</code>. When
3363 this option is not given, and the configuration variable
3364 <code>diff.wsErrorHighlight</code> is not set, only whitespace errors in
3365 <code>new</code> lines are highlighted. The whitespace errors are colored
3366 with <code>color.diff.whitespace</code>.</p>
3367 </dd>
3368 <dt class="hdlist1"><code>--full-index</code></dt>
3369 <dd>
3370 <p>Instead of the first handful of characters, show the full
3371 pre- and post-image blob object names on the "index"
3372 line when generating patch format output.</p>
3373 </dd>
3374 <dt class="hdlist1"><code>--binary</code></dt>
3375 <dd>
3376 <p>In addition to <code>--full-index</code>, output a binary diff that
3377 can be applied with <code>git-apply</code>.
3378 Implies <code>--patch</code>.</p>
3379 </dd>
3380 <dt class="hdlist1"><code>--abbrev</code>[<code>=</code><em>&lt;n&gt;</em>]</dt>
3381 <dd>
3382 <p>Instead of showing the full 40-byte hexadecimal object
3383 name in diff-raw format output and diff-tree header
3384 lines, show the shortest prefix that is at least <em>&lt;n&gt;</em>
3385 hexdigits long that uniquely refers the object.
3386 In diff-patch output format, <code>--full-index</code> takes higher
3387 precedence, i.e. if <code>--full-index</code> is specified, full blob
3388 names will be shown regardless of <code>--abbrev</code>.
3389 Non default number of digits can be specified with <code>--abbrev=</code><em>&lt;n&gt;</em>.</p>
3390 </dd>
3391 <dt class="hdlist1"><code>-B</code>[<em>&lt;n&gt;</em>][<code>/</code><em>&lt;m&gt;</em>]</dt>
3392 <dt class="hdlist1"><code>--break-rewrites</code>[<code>=</code>[<em>&lt;n&gt;</em>][<code>/</code><em>&lt;m&gt;</em>]]</dt>
3393 <dd>
3394 <p>Break complete rewrite changes into pairs of delete and
3395 create. This serves two purposes:</p>
3396 <div class="paragraph">
3397 <p>It affects the way a change that amounts to a total rewrite of a file
3398 not as a series of deletion and insertion mixed together with a very
3399 few lines that happen to match textually as the context, but as a
3400 single deletion of everything old followed by a single insertion of
3401 everything new, and the number <em>&lt;m&gt;</em> controls this aspect of the <code>-B</code>
3402 option (defaults to 60%). <code>-B/70</code>% specifies that less than 30% of the
3403 original should remain in the result for Git to consider it a total
3404 rewrite (i.e. otherwise the resulting patch will be a series of
3405 deletion and insertion mixed together with context lines).</p>
3406 </div>
3407 <div class="paragraph">
3408 <p>When used with <code>-M</code>, a totally-rewritten file is also considered as the
3409 source of a rename (usually <code>-M</code> only considers a file that disappeared
3410 as the source of a rename), and the number <em>&lt;n&gt;</em> controls this aspect of
3411 the <code>-B</code> option (defaults to 50%). <code>-B20</code>% specifies that a change with
3412 addition and deletion compared to 20% or more of the file&#8217;s size are
3413 eligible for being picked up as a possible source of a rename to
3414 another file.</p>
3415 </div>
3416 </dd>
3417 <dt class="hdlist1"><code>-M</code>[<em>&lt;n&gt;</em>]</dt>
3418 <dt class="hdlist1"><code>--find-renames</code>[<code>=</code><em>&lt;n&gt;</em>]</dt>
3419 <dd>
3420 <p>If generating diffs, detect and report renames for each commit.
3421 For following files across renames while traversing history, see
3422 <code>--follow</code>.
3423 If <em>&lt;n&gt;</em> is specified, it is a threshold on the similarity
3424 index (i.e. amount of addition/deletions compared to the
3425 file&#8217;s size). For example, <code>-M90</code>% means Git should consider a
3426 delete/add pair to be a rename if more than 90% of the file
3427 hasn&#8217;t changed. Without a % sign, the number is to be read as
3428 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
3429 0.5, and is thus the same as <code>-M50</code>%. Similarly, <code>-M05</code> is
3430 the same as <code>-M5</code>%. To limit detection to exact renames, use
3431 <code>-M100</code>%. The default similarity index is 50%.</p>
3432 </dd>
3433 <dt class="hdlist1"><code>-C</code>[<em>&lt;n&gt;</em>]</dt>
3434 <dt class="hdlist1"><code>--find-copies</code>[<code>=</code><em>&lt;n&gt;</em>]</dt>
3435 <dd>
3436 <p>Detect copies as well as renames. See also <code>--find-copies-harder</code>.
3437 If <em>&lt;n&gt;</em> is specified, it has the same meaning as for <code>-M</code><em>&lt;n&gt;</em>.</p>
3438 </dd>
3439 <dt class="hdlist1"><code>--find-copies-harder</code></dt>
3440 <dd>
3441 <p>For performance reasons, by default, <code>-C</code> option finds copies only
3442 if the original file of the copy was modified in the same
3443 changeset. This flag makes the command
3444 inspect unmodified files as candidates for the source of
3445 copy. This is a very expensive operation for large
3446 projects, so use it with caution. Giving more than one
3447 <code>-C</code> option has the same effect.</p>
3448 </dd>
3449 <dt class="hdlist1"><code>-D</code></dt>
3450 <dt class="hdlist1"><code>--irreversible-delete</code></dt>
3451 <dd>
3452 <p>Omit the preimage for deletes, i.e. print only the header but not
3453 the diff between the preimage and <code>/dev/null</code>. The resulting patch
3454 is not meant to be applied with <code>patch</code> or <code>git</code> <code>apply</code>; this is
3455 solely for people who want to just concentrate on reviewing the
3456 text after the change. In addition, the output obviously lacks
3457 enough information to apply such a patch in reverse, even manually,
3458 hence the name of the option.</p>
3459 <div class="paragraph">
3460 <p>When used together with <code>-B</code>, omit also the preimage in the deletion part
3461 of a delete/create pair.</p>
3462 </div>
3463 </dd>
3464 <dt class="hdlist1"><code>-l</code><em>&lt;num&gt;</em></dt>
3465 <dd>
3466 <p>The <code>-M</code> and <code>-C</code> options involve some preliminary steps that
3467 can detect subsets of renames/copies cheaply, followed by an
3468 exhaustive fallback portion that compares all remaining
3469 unpaired destinations to all relevant sources. (For renames,
3470 only remaining unpaired sources are relevant; for copies, all
3471 original sources are relevant.) For N sources and
3472 destinations, this exhaustive check is O(N^2). This option
3473 prevents the exhaustive portion of rename/copy detection from
3474 running if the number of source/destination files involved
3475 exceeds the specified number. Defaults to <code>diff.renameLimit</code>.
3476 Note that a value of 0 is treated as unlimited.</p>
3477 </dd>
3478 <dt class="hdlist1"><code>--diff-filter=</code>[(<code>A</code>|<code>C</code>|<code>D</code>|<code>M</code>|<code>R</code>|<code>T</code>|<code>U</code>|<code>X</code>|<code>B</code>)<code>...</code>[*]]</dt>
3479 <dd>
3480 <p>Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
3481 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
3482 type (i.e. regular file, symlink, submodule, &#8230;&#8203;) changed (<code>T</code>),
3483 are Unmerged (<code>U</code>), are
3484 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
3485 Any combination of the filter characters (including none) can be used.
3486 When * (All-or-none) is added to the combination, all
3487 paths are selected if there is any file that matches
3488 other criteria in the comparison; if there is no file
3489 that matches other criteria, nothing is selected.</p>
3490 <div class="paragraph">
3491 <p>Also, these upper-case letters can be downcased to exclude. E.g.
3492 <code>--diff-filter=ad</code> excludes added and deleted paths.</p>
3493 </div>
3494 <div class="paragraph">
3495 <p>Note that not all diffs can feature all types. For instance, copied and
3496 renamed entries cannot appear if detection for those types is disabled.</p>
3497 </div>
3498 </dd>
3499 <dt class="hdlist1"><code>-S</code><em>&lt;string&gt;</em></dt>
3500 <dd>
3501 <p>Look for differences that change the number of occurrences of
3502 the specified <em>&lt;string&gt;</em> (i.e. addition/deletion) in a file.
3503 Intended for the scripter&#8217;s use.</p>
3504 <div class="paragraph">
3505 <p>It is useful when you&#8217;re looking for an exact block of code (like a
3506 struct), and want to know the history of that block since it first
3507 came into being: use the feature iteratively to feed the interesting
3508 block in the preimage back into <code>-S</code>, and keep going until you get the
3509 very first version of the block.</p>
3510 </div>
3511 <div class="paragraph">
3512 <p>Binary files are searched as well.</p>
3513 </div>
3514 </dd>
3515 <dt class="hdlist1"><code>-G</code><em>&lt;regex&gt;</em></dt>
3516 <dd>
3517 <p>Look for differences whose patch text contains added/removed
3518 lines that match <em>&lt;regex&gt;</em>.</p>
3519 <div class="paragraph">
3520 <p>To illustrate the difference between <code>-S</code><em>&lt;regex&gt;</em> <code>--pickaxe-regex</code> and
3521 <code>-G</code><em>&lt;regex&gt;</em>, consider a commit with the following diff in the same
3522 file:</p>
3523 </div>
3524 <div class="listingblock">
3525 <div class="content">
3526 <pre>+ return frotz(nitfol, two-&gt;ptr, 1, 0);
3528 - hit = frotz(nitfol, mf2.ptr, 1, 0);</pre>
3529 </div>
3530 </div>
3531 <div class="paragraph">
3532 <p>While <code>git</code> <code>log</code> <code>-G</code>"frotz\(<code>nitfol</code>" will show this commit, <code>git</code> <code>log</code>
3533 <code>-S</code>"frotz\(<code>nitfol</code>" <code>--pickaxe-regex</code> will not (because the number of
3534 occurrences of that string did not change).</p>
3535 </div>
3536 <div class="paragraph">
3537 <p>Unless <code>--text</code> is supplied patches of binary files without a textconv
3538 filter will be ignored.</p>
3539 </div>
3540 <div class="paragraph">
3541 <p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
3542 information.</p>
3543 </div>
3544 </dd>
3545 <dt class="hdlist1"><code>--find-object=</code><em>&lt;object-id&gt;</em></dt>
3546 <dd>
3547 <p>Look for differences that change the number of occurrences of
3548 the specified object. Similar to <code>-S</code>, just the argument is different
3549 in that it doesn&#8217;t search for a specific string but for a specific
3550 object id.</p>
3551 <div class="paragraph">
3552 <p>The object can be a blob or a submodule commit. It implies the <code>-t</code> option in
3553 <code>git-log</code> to also find trees.</p>
3554 </div>
3555 </dd>
3556 <dt class="hdlist1"><code>--pickaxe-all</code></dt>
3557 <dd>
3558 <p>When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
3559 changeset, not just the files that contain the change
3560 in <em>&lt;string&gt;</em>.</p>
3561 </dd>
3562 <dt class="hdlist1"><code>--pickaxe-regex</code></dt>
3563 <dd>
3564 <p>Treat the <em>&lt;string&gt;</em> given to <code>-S</code> as an extended POSIX regular
3565 expression to match.</p>
3566 </dd>
3567 <dt class="hdlist1"><code>-O</code><em>&lt;orderfile&gt;</em></dt>
3568 <dd>
3569 <p>Control the order in which files appear in the output.
3570 This overrides the <code>diff.orderFile</code> configuration variable
3571 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
3572 use <code>-O/dev/null</code>.</p>
3573 <div class="paragraph">
3574 <p>The output order is determined by the order of glob patterns in
3575 <em>&lt;orderfile&gt;</em>.
3576 All files with pathnames that match the first pattern are output
3577 first, all files with pathnames that match the second pattern (but not
3578 the first) are output next, and so on.
3579 All files with pathnames that do not match any pattern are output
3580 last, as if there was an implicit match-all pattern at the end of the
3581 file.
3582 If multiple pathnames have the same rank (they match the same pattern
3583 but no earlier patterns), their output order relative to each other is
3584 the normal order.</p>
3585 </div>
3586 <div class="paragraph">
3587 <p><em>&lt;orderfile&gt;</em> is parsed as follows:</p>
3588 </div>
3589 <div class="openblock">
3590 <div class="content">
3591 <div class="ulist">
3592 <ul>
3593 <li>
3594 <p>Blank lines are ignored, so they can be used as separators for
3595 readability.</p>
3596 </li>
3597 <li>
3598 <p>Lines starting with a hash ("#") are ignored, so they can be used
3599 for comments. Add a backslash ("\") to the beginning of the
3600 pattern if it starts with a hash.</p>
3601 </li>
3602 <li>
3603 <p>Each other line contains a single pattern.</p>
3604 </li>
3605 </ul>
3606 </div>
3607 </div>
3608 </div>
3609 <div class="paragraph">
3610 <p>Patterns have the same syntax and semantics as patterns used for
3611 <code>fnmatch</code>(3) without the <code>FNM_PATHNAME</code> flag, except a pathname also
3612 matches a pattern if removing any number of the final pathname
3613 components matches the pattern. For example, the pattern "<code>foo</code>*bar"
3614 matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p>
3615 </div>
3616 </dd>
3617 <dt class="hdlist1"><code>--skip-to=</code><em>&lt;file&gt;</em></dt>
3618 <dt class="hdlist1"><code>--rotate-to=</code><em>&lt;file&gt;</em></dt>
3619 <dd>
3620 <p>Discard the files before the named <em>&lt;file&gt;</em> from the output
3621 (i.e. <em>skip to</em>), or move them to the end of the output
3622 (i.e. <em>rotate to</em>). These options were invented primarily for the use
3623 of the <code>git</code> <code>difftool</code> command, and may not be very useful
3624 otherwise.</p>
3625 </dd>
3626 <dt class="hdlist1"><code>-R</code></dt>
3627 <dd>
3628 <p>Swap two inputs; that is, show differences from index or
3629 on-disk file to tree contents.</p>
3630 </dd>
3631 <dt class="hdlist1"><code>--relative</code>[<code>=</code><em>&lt;path&gt;</em>]</dt>
3632 <dt class="hdlist1"><code>--no-relative</code></dt>
3633 <dd>
3634 <p>When run from a subdirectory of the project, it can be
3635 told to exclude changes outside the directory and show
3636 pathnames relative to it with this option. When you are
3637 not in a subdirectory (e.g. in a bare repository), you
3638 can name which subdirectory to make the output relative
3639 to by giving a <em>&lt;path&gt;</em> as an argument.
3640 <code>--no-relative</code> can be used to countermand both <code>diff.relative</code> config
3641 option and previous <code>--relative</code>.</p>
3642 </dd>
3643 <dt class="hdlist1"><code>-a</code></dt>
3644 <dt class="hdlist1"><code>--text</code></dt>
3645 <dd>
3646 <p>Treat all files as text.</p>
3647 </dd>
3648 <dt class="hdlist1"><code>--ignore-cr-at-eol</code></dt>
3649 <dd>
3650 <p>Ignore carriage-return at the end of line when doing a comparison.</p>
3651 </dd>
3652 <dt class="hdlist1"><code>--ignore-space-at-eol</code></dt>
3653 <dd>
3654 <p>Ignore changes in whitespace at EOL.</p>
3655 </dd>
3656 <dt class="hdlist1"><code>-b</code></dt>
3657 <dt class="hdlist1"><code>--ignore-space-change</code></dt>
3658 <dd>
3659 <p>Ignore changes in amount of whitespace. This ignores whitespace
3660 at line end, and considers all other sequences of one or
3661 more whitespace characters to be equivalent.</p>
3662 </dd>
3663 <dt class="hdlist1"><code>-w</code></dt>
3664 <dt class="hdlist1"><code>--ignore-all-space</code></dt>
3665 <dd>
3666 <p>Ignore whitespace when comparing lines. This ignores
3667 differences even if one line has whitespace where the other
3668 line has none.</p>
3669 </dd>
3670 <dt class="hdlist1"><code>--ignore-blank-lines</code></dt>
3671 <dd>
3672 <p>Ignore changes whose lines are all blank.</p>
3673 </dd>
3674 <dt class="hdlist1"><code>-I</code><em>&lt;regex&gt;</em></dt>
3675 <dt class="hdlist1"><code>--ignore-matching-lines=</code><em>&lt;regex&gt;</em></dt>
3676 <dd>
3677 <p>Ignore changes whose all lines match <em>&lt;regex&gt;</em>. This option may
3678 be specified more than once.</p>
3679 </dd>
3680 <dt class="hdlist1"><code>--inter-hunk-context=</code><em>&lt;number&gt;</em></dt>
3681 <dd>
3682 <p>Show the context between diff hunks, up to the specified <em>&lt;number&gt;</em>
3683 of lines, thereby fusing hunks that are close to each other.
3684 Defaults to <code>diff.interHunkContext</code> or 0 if the config option
3685 is unset.</p>
3686 </dd>
3687 <dt class="hdlist1"><code>-W</code></dt>
3688 <dt class="hdlist1"><code>--function-context</code></dt>
3689 <dd>
3690 <p>Show whole function as context lines for each change.
3691 The function names are determined in the same way as
3692 <code>git</code> <code>diff</code> works out patch hunk headers (see "Defining a
3693 custom hunk-header" in <a href="gitattributes.html">gitattributes(5)</a>).</p>
3694 </dd>
3695 <dt class="hdlist1"><code>--ext-diff</code></dt>
3696 <dd>
3697 <p>Allow an external diff helper to be executed. If you set an
3698 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
3699 to use this option with <a href="git-log.html">git-log(1)</a> and friends.</p>
3700 </dd>
3701 <dt class="hdlist1"><code>--no-ext-diff</code></dt>
3702 <dd>
3703 <p>Disallow external diff drivers.</p>
3704 </dd>
3705 <dt class="hdlist1"><code>--textconv</code></dt>
3706 <dt class="hdlist1"><code>--no-textconv</code></dt>
3707 <dd>
3708 <p>Allow (or disallow) external text conversion filters to be run
3709 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
3710 details. Because textconv filters are typically a one-way
3711 conversion, the resulting diff is suitable for human
3712 consumption, but cannot be applied. For this reason, textconv
3713 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
3714 <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or
3715 diff plumbing commands.</p>
3716 </dd>
3717 <dt class="hdlist1"><code>--ignore-submodules</code>[<code>=</code>(<code>none</code>|<code>untracked</code>|<code>dirty</code>|<code>all</code>)]</dt>
3718 <dd>
3719 <p>Ignore changes to submodules in the diff generation. <code>all</code> is the default.
3720 Using <code>none</code> will consider the submodule modified when it either contains
3721 untracked or modified files or its <code>HEAD</code> differs from the commit recorded
3722 in the superproject and can be used to override any settings of the
3723 <code>ignore</code> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
3724 <code>untracked</code> is used submodules are not considered dirty when they only
3725 contain untracked content (but they are still scanned for modified
3726 content). Using <code>dirty</code> ignores all changes to the work tree of submodules,
3727 only changes to the commits stored in the superproject are shown (this was
3728 the behavior until 1.7.0). Using <code>all</code> hides all changes to submodules.</p>
3729 </dd>
3730 <dt class="hdlist1"><code>--src-prefix=</code><em>&lt;prefix&gt;</em></dt>
3731 <dd>
3732 <p>Show the given source <em>&lt;prefix&gt;</em> instead of "a/".</p>
3733 </dd>
3734 <dt class="hdlist1"><code>--dst-prefix=</code><em>&lt;prefix&gt;</em></dt>
3735 <dd>
3736 <p>Show the given destination <em>&lt;prefix&gt;</em> instead of "b/".</p>
3737 </dd>
3738 <dt class="hdlist1"><code>--no-prefix</code></dt>
3739 <dd>
3740 <p>Do not show any source or destination prefix.</p>
3741 </dd>
3742 <dt class="hdlist1"><code>--default-prefix</code></dt>
3743 <dd>
3744 <p>Use the default source and destination prefixes ("a/" and "b/").
3745 This overrides configuration variables such as <code>diff.noprefix</code>,
3746 <code>diff.srcPrefix</code>, <code>diff.dstPrefix</code>, and <code>diff.mnemonicPrefix</code>
3747 (see <a href="git-config.html">git-config(1)</a>).</p>
3748 </dd>
3749 <dt class="hdlist1"><code>--line-prefix=</code><em>&lt;prefix&gt;</em></dt>
3750 <dd>
3751 <p>Prepend an additional <em>&lt;prefix&gt;</em> to every line of output.</p>
3752 </dd>
3753 <dt class="hdlist1"><code>--ita-invisible-in-index</code></dt>
3754 <dd>
3755 <p>By default entries added by <code>git</code> <code>add</code> <code>-N</code> appear as an existing
3756 empty file in <code>git</code> <code>diff</code> and a new file in <code>git</code> <code>diff</code> <code>--cached</code>.
3757 This option makes the entry appear as a new file in <code>git</code> <code>diff</code>
3758 and non-existent in <code>git</code> <code>diff</code> <code>--cached</code>. This option could be
3759 reverted with <code>--ita-visible-in-index</code>. Both options are
3760 experimental and could be removed in future.</p>
3761 </dd>
3762 </dl>
3763 </div>
3764 <div class="paragraph">
3765 <p>For more detailed explanation on these common options, see also
3766 <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p>
3767 </div>
3768 </div>
3769 </div>
3770 <div class="sect1">
3771 <h2 id="generate_patch_text_with_p">Generating patch text with -p</h2>
3772 <div class="sectionbody">
3773 <div class="paragraph">
3774 <p>Running
3775 <a href="git-diff.html">git-diff(1)</a>,
3776 <a href="git-log.html">git-log(1)</a>,
3777 <a href="git-show.html">git-show(1)</a>,
3778 <a href="git-diff-index.html">git-diff-index(1)</a>,
3779 <a href="git-diff-tree.html">git-diff-tree(1)</a>, or
3780 <a href="git-diff-files.html">git-diff-files(1)</a>
3781 with the <code>-p</code> option produces patch text.
3782 You can customize the creation of patch text via the
3783 <code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables
3784 (see <a href="git.html">git(1)</a>), and the <code>diff</code> attribute (see <a href="gitattributes.html">gitattributes(5)</a>).</p>
3785 </div>
3786 <div class="paragraph">
3787 <p>What the <code>-p</code> option produces is slightly different from the traditional
3788 diff format:</p>
3789 </div>
3790 <div class="olist arabic">
3791 <ol class="arabic">
3792 <li>
3793 <p>It is preceded by a "git diff" header that looks like this:</p>
3794 <div class="literalblock">
3795 <div class="content">
3796 <pre>diff --git a/file1 b/file2</pre>
3797 </div>
3798 </div>
3799 <div class="paragraph">
3800 <p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is
3801 involved. Especially, even for a creation or a deletion,
3802 <code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p>
3803 </div>
3804 <div class="paragraph">
3805 <p>When a rename/copy is involved, <code>file1</code> and <code>file2</code> show the
3806 name of the source file of the rename/copy and the name of
3807 the file that the rename/copy produces, respectively.</p>
3808 </div>
3809 </li>
3810 <li>
3811 <p>It is followed by one or more extended header lines:</p>
3812 <div class="verseblock">
3813 <pre class="content"><code>old</code> <code>mode</code> <em>&lt;mode&gt;</em>
3814 <code>new</code> <code>mode</code> <em>&lt;mode&gt;</em>
3815 <code>deleted</code> <code>file</code> <code>mode</code> <em>&lt;mode&gt;</em>
3816 <code>new</code> <code>file</code> <code>mode</code> <em>&lt;mode&gt;</em>
3817 <code>copy</code> <code>from</code> <em>&lt;path&gt;</em>
3818 <code>copy</code> <code>to</code> <em>&lt;path&gt;</em>
3819 <code>rename</code> <code>from</code> <em>&lt;path&gt;</em>
3820 <code>rename</code> <code>to</code> <em>&lt;path&gt;</em>
3821 <code>similarity</code> <code>index</code> <em>&lt;number&gt;</em>
3822 <code>dissimilarity</code> <code>index</code> <em>&lt;number&gt;</em>
3823 <code>index</code> <em>&lt;hash&gt;</em>`..`<em>&lt;hash&gt;</em> <em>&lt;mode&gt;</em></pre>
3824 </div>
3825 <div class="paragraph">
3826 <p>File modes <em>&lt;mode&gt;</em> are printed as 6-digit octal numbers including the file type
3827 and file permission bits.</p>
3828 </div>
3829 <div class="paragraph">
3830 <p>Path names in extended headers do not include the <code>a/</code> and <code>b/</code> prefixes.</p>
3831 </div>
3832 <div class="paragraph">
3833 <p>The similarity index is the percentage of unchanged lines, and
3834 the dissimilarity index is the percentage of changed lines. It
3835 is a rounded down integer, followed by a percent sign. The
3836 similarity index value of 100% is thus reserved for two equal
3837 files, while 100% dissimilarity means that no line from the old
3838 file made it into the new one.</p>
3839 </div>
3840 <div class="paragraph">
3841 <p>The index line includes the blob object names before and after the change.
3842 The <em>&lt;mode&gt;</em> is included if the file mode does not change; otherwise,
3843 separate lines indicate the old and the new mode.</p>
3844 </div>
3845 </li>
3846 <li>
3847 <p>Pathnames with "unusual" characters are quoted as explained for
3848 the configuration variable <code>core.quotePath</code> (see
3849 <a href="git-config.html">git-config(1)</a>).</p>
3850 </li>
3851 <li>
3852 <p>All the <code>file1</code> files in the output refer to files before the
3853 commit, and all the <code>file2</code> files refer to files after the commit.
3854 It is incorrect to apply each change to each file sequentially. For
3855 example, this patch will swap a and b:</p>
3856 <div class="literalblock">
3857 <div class="content">
3858 <pre>diff --git a/a b/b
3859 rename from a
3860 rename to b
3861 diff --git a/b b/a
3862 rename from b
3863 rename to a</pre>
3864 </div>
3865 </div>
3866 </li>
3867 <li>
3868 <p>Hunk headers mention the name of the function to which the hunk
3869 applies. See "Defining a custom hunk-header" in
3870 <a href="gitattributes.html">gitattributes(5)</a> for details of how to tailor this to
3871 specific languages.</p>
3872 </li>
3873 </ol>
3874 </div>
3875 </div>
3876 </div>
3877 <div class="sect1">
3878 <h2 id="_combined_diff_format">Combined diff format</h2>
3879 <div class="sectionbody">
3880 <div class="paragraph">
3881 <p>Any diff-generating command can take the <code>-c</code> or <code>--cc</code> option to
3882 produce a <em>combined diff</em> when showing a merge. This is the default
3883 format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
3884 <a href="git-show.html">git-show(1)</a>. Note also that you can give suitable
3885 <code>--diff-merges</code> option to any of these commands to force generation of
3886 diffs in a specific format.</p>
3887 </div>
3888 <div class="paragraph">
3889 <p>A "combined diff" format looks like this:</p>
3890 </div>
3891 <div class="listingblock">
3892 <div class="content">
3893 <pre>diff --combined describe.c
3894 index fabadb8,cc95eb0..4866510
3895 --- a/describe.c
3896 +++ b/describe.c
3897 @@@ -98,20 -98,12 +98,20 @@@
3898 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
3901 - static void describe(char *arg)
3902 -static void describe(struct commit *cmit, int last_one)
3903 ++static void describe(char *arg, int last_one)
3905 + unsigned char sha1[20];
3906 + struct commit *cmit;
3907 struct commit_list *list;
3908 static int initialized = 0;
3909 struct commit_name *n;
3911 + if (get_sha1(arg, sha1) &lt; 0)
3912 + usage(describe_usage);
3913 + cmit = lookup_commit_reference(sha1);
3914 + if (!cmit)
3915 + usage(describe_usage);
3917 if (!initialized) {
3918 initialized = 1;
3919 for_each_ref(get_name);</pre>
3920 </div>
3921 </div>
3922 <div class="olist arabic">
3923 <ol class="arabic">
3924 <li>
3925 <p>It is preceded by a "git diff" header, that looks like
3926 this (when the <code>-c</code> option is used):</p>
3927 <div class="literalblock">
3928 <div class="content">
3929 <pre>diff --combined file</pre>
3930 </div>
3931 </div>
3932 <div class="paragraph">
3933 <p>or like this (when the <code>--cc</code> option is used):</p>
3934 </div>
3935 <div class="literalblock">
3936 <div class="content">
3937 <pre>diff --cc file</pre>
3938 </div>
3939 </div>
3940 </li>
3941 <li>
3942 <p>It is followed by one or more extended header lines
3943 (this example shows a merge with two parents):</p>
3944 <div class="verseblock">
3945 <pre class="content"><code>index</code> <em>&lt;hash&gt;</em><code>,</code><em>&lt;hash&gt;</em>`..<code>__</code><em>&lt;hash&gt;</em><code>__</code>
3946 {empty}`mode <em>&lt;mode&gt;</em><code>,</code><em>&lt;mode&gt;</em>``..``<em>&lt;mode&gt;</em>
3947 <code>new</code> <code>file</code> <code>mode</code> <em>&lt;mode&gt;</em>
3948 <code>deleted</code> <code>file</code> <code>mode</code> <em>&lt;mode&gt;</em><code>,</code><em>&lt;mode&gt;</em></pre>
3949 </div>
3950 <div class="paragraph">
3951 <p>The <code>mode</code> <em>&lt;mode&gt;</em><code>,</code><em>&lt;mode&gt;</em><code>..</code><em>&lt;mode&gt;</em> line appears only if at least one of
3952 the &lt;mode&gt; is different from the rest. Extended headers with
3953 information about detected content movement (renames and
3954 copying detection) are designed to work with the diff of two
3955 <em>&lt;tree-ish&gt;</em> and are not used by combined diff format.</p>
3956 </div>
3957 </li>
3958 <li>
3959 <p>It is followed by a two-line from-file/to-file header:</p>
3960 <div class="literalblock">
3961 <div class="content">
3962 <pre>--- a/file
3963 +++ b/file</pre>
3964 </div>
3965 </div>
3966 <div class="paragraph">
3967 <p>Similar to the two-line header for the traditional <em>unified</em> diff
3968 format, <code>/dev/null</code> is used to signal created or deleted
3969 files.</p>
3970 </div>
3971 <div class="paragraph">
3972 <p>However, if the --combined-all-paths option is provided, instead of a
3973 two-line from-file/to-file, you get an N+1 line from-file/to-file header,
3974 where N is the number of parents in the merge commit:</p>
3975 </div>
3976 <div class="literalblock">
3977 <div class="content">
3978 <pre>--- a/file
3979 --- a/file
3980 --- a/file
3981 +++ b/file</pre>
3982 </div>
3983 </div>
3984 <div class="paragraph">
3985 <p>This extended format can be useful if rename or copy detection is
3986 active, to allow you to see the original name of the file in different
3987 parents.</p>
3988 </div>
3989 </li>
3990 <li>
3991 <p>Chunk header format is modified to prevent people from
3992 accidentally feeding it to <code>patch</code> <code>-p1</code>. Combined diff format
3993 was created for review of merge commit changes, and was not
3994 meant to be applied. The change is similar to the change in the
3995 extended <em>index</em> header:</p>
3996 <div class="literalblock">
3997 <div class="content">
3998 <pre>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</pre>
3999 </div>
4000 </div>
4001 <div class="paragraph">
4002 <p>There are (number of parents + 1) <code>@</code> characters in the chunk
4003 header for combined diff format.</p>
4004 </div>
4005 </li>
4006 </ol>
4007 </div>
4008 <div class="paragraph">
4009 <p>Unlike the traditional <em>unified</em> diff format, which shows two
4010 files A and B with a single column that has <code>-</code> (minus&#8201;&#8212;&#8201;appears in A but removed in B), <code>+</code> (plus&#8201;&#8212;&#8201;missing in A but
4011 added to B), or " " (space&#8201;&#8212;&#8201;unchanged) prefix, this format
4012 compares two or more files file1, file2,&#8230;&#8203; with one file X, and
4013 shows how X differs from each of fileN. One column for each of
4014 fileN is prepended to the output line to note how X&#8217;s line is
4015 different from it.</p>
4016 </div>
4017 <div class="paragraph">
4018 <p>A <code>-</code> character in the column N means that the line appears in
4019 fileN but it does not appear in the result. A <code>+</code> character
4020 in the column N means that the line appears in the result,
4021 and fileN does not have that line (in other words, the line was
4022 added, from the point of view of that parent).</p>
4023 </div>
4024 <div class="paragraph">
4025 <p>In the above example output, the function signature was changed
4026 from both files (hence two <code>-</code> removals from both file1 and
4027 file2, plus <code>++</code> to mean one line that was added does not appear
4028 in either file1 or file2). Also, eight other lines are the same
4029 from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p>
4030 </div>
4031 <div class="paragraph">
4032 <p>When shown by <code>git</code> <code>diff-tree</code> <code>-c</code>, it compares the parents of a
4033 merge commit with the merge result (i.e. file1..fileN are the
4034 parents). When shown by <code>git</code> <code>diff-files</code> <code>-c</code>, it compares the
4035 two unresolved merge parents with the working tree file
4036 (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
4037 "their version").</p>
4038 </div>
4039 </div>
4040 </div>
4041 <div class="sect1">
4042 <h2 id="_examples">EXAMPLES</h2>
4043 <div class="sectionbody">
4044 <div class="dlist">
4045 <dl>
4046 <dt class="hdlist1"><code>git</code> <code>log</code> <code>--no-merges</code></dt>
4047 <dd>
4048 <p>Show the whole commit history, but skip any merges</p>
4049 </dd>
4050 <dt class="hdlist1"><code>git</code> <code>log</code> <code>v2.6.12</code><code>..</code> <code>include/scsi</code> <code>drivers/scsi</code></dt>
4051 <dd>
4052 <p>Show all commits since version <em>v2.6.12</em> that changed any file
4053 in the <code>include/scsi</code> or <code>drivers/scsi</code> subdirectories</p>
4054 </dd>
4055 <dt class="hdlist1"><code>git</code> <code>log</code> <code>--since=</code>"2 <code>weeks</code> <code>ago</code>" <code>--</code> <code>gitk</code></dt>
4056 <dd>
4057 <p>Show the changes during the last two weeks to the file <em>gitk</em>.
4058 The <code>--</code> is necessary to avoid confusion with the <strong>branch</strong> named
4059 <em>gitk</em></p>
4060 </dd>
4061 <dt class="hdlist1"><code>git</code> <code>log</code> <code>--name-status</code> <code>release</code><code>..</code><code>test</code></dt>
4062 <dd>
4063 <p>Show the commits that are in the "test" branch but not yet
4064 in the "release" branch, along with the list of paths
4065 each commit modifies.</p>
4066 </dd>
4067 <dt class="hdlist1"><code>git</code> <code>log</code> <code>--follow</code> <code>builtin/rev-list.c</code></dt>
4068 <dd>
4069 <p>Shows the commits that changed <code>builtin/rev-list.c</code>, including
4070 those commits that occurred before the file was given its
4071 present name.</p>
4072 </dd>
4073 <dt class="hdlist1"><code>git</code> <code>log</code> <code>--branches</code> <code>--not</code> <code>--remotes=origin</code></dt>
4074 <dd>
4075 <p>Shows all commits that are in any of local branches but not in
4076 any of remote-tracking branches for <em>origin</em> (what you have that
4077 origin doesn&#8217;t).</p>
4078 </dd>
4079 <dt class="hdlist1"><code>git</code> <code>log</code> <code>master</code> <code>--not</code> <code>--remotes=</code>*/master</dt>
4080 <dd>
4081 <p>Shows all commits that are in local master but not in any remote
4082 repository master branches.</p>
4083 </dd>
4084 <dt class="hdlist1"><code>git</code> <code>log</code> <code>-p</code> <code>-m</code> <code>--first-parent</code></dt>
4085 <dd>
4086 <p>Shows the history including change diffs, but only from the
4087 &#8220;main branch&#8221; perspective, skipping commits that come from merged
4088 branches, and showing full diffs of changes introduced by the merges.
4089 This makes sense only when following a strict policy of merging all
4090 topic branches when staying on a single integration branch.</p>
4091 </dd>
4092 <dt class="hdlist1"><code>git</code> <code>log</code> <code>-L</code> '/int <code>main/</code>',/^}/:main.<code>c</code></dt>
4093 <dd>
4094 <p>Shows how the function <code>main</code>() in the file <code>main.c</code> evolved
4095 over time.</p>
4096 </dd>
4097 <dt class="hdlist1"><code>git</code> <code>log</code> <code>-3</code></dt>
4098 <dd>
4099 <p>Limits the number of commits to show to 3.</p>
4100 </dd>
4101 </dl>
4102 </div>
4103 </div>
4104 </div>
4105 <div class="sect1">
4106 <h2 id="_discussion">DISCUSSION</h2>
4107 <div class="sectionbody">
4108 <div class="paragraph">
4109 <p>Git is to some extent character encoding agnostic.</p>
4110 </div>
4111 <div class="ulist">
4112 <ul>
4113 <li>
4114 <p>The contents of the blob objects are uninterpreted sequences
4115 of bytes. There is no encoding translation at the core
4116 level.</p>
4117 </li>
4118 <li>
4119 <p>Path names are encoded in UTF-8 normalization form C. This
4120 applies to tree objects, the index file, ref names, as well as
4121 path names in command line arguments, environment variables
4122 and config files (.<code>git/config</code> (see <a href="git-config.html">git-config(1)</a>),
4123 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
4124 <a href="gitmodules.html">gitmodules(5)</a>).</p>
4125 <div class="paragraph">
4126 <p>Note that Git at the core level treats path names simply as
4127 sequences of non-NUL bytes, there are no path name encoding
4128 conversions (except on Mac and Windows). Therefore, using
4129 non-ASCII path names will mostly work even on platforms and file
4130 systems that use legacy extended ASCII encodings. However,
4131 repositories created on such systems will not work properly on
4132 UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
4133 Additionally, many Git-based tools simply assume path names to
4134 be UTF-8 and will fail to display other encodings correctly.</p>
4135 </div>
4136 </li>
4137 <li>
4138 <p>Commit log messages are typically encoded in UTF-8, but other
4139 extended ASCII encodings are also supported. This includes
4140 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
4141 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
4142 EUC-x, CP9xx etc.).</p>
4143 </li>
4144 </ul>
4145 </div>
4146 <div class="paragraph">
4147 <p>Although we encourage that the commit log messages are encoded
4148 in UTF-8, both the core and Git Porcelain are designed not to
4149 force UTF-8 on projects. If all participants of a particular
4150 project find it more convenient to use legacy encodings, Git
4151 does not forbid it. However, there are a few things to keep in
4152 mind.</p>
4153 </div>
4154 <div class="olist arabic">
4155 <ol class="arabic">
4156 <li>
4157 <p><em>git commit</em> and <em>git commit-tree</em> issue
4158 a warning if the commit log message given to it does not look
4159 like a valid UTF-8 string, unless you explicitly say your
4160 project uses a legacy encoding. The way to say this is to
4161 have <code>i18n.commitEncoding</code> in .<code>git/config</code> file, like this:</p>
4162 <div class="listingblock">
4163 <div class="content">
4164 <pre>[i18n]
4165 commitEncoding = ISO-8859-1</pre>
4166 </div>
4167 </div>
4168 <div class="paragraph">
4169 <p>Commit objects created with the above setting record the value
4170 of <code>i18n.commitEncoding</code> in their <code>encoding</code> header. This is to
4171 help other people who look at them later. Lack of this header
4172 implies that the commit log message is encoded in UTF-8.</p>
4173 </div>
4174 </li>
4175 <li>
4176 <p><em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
4177 <code>encoding</code> header of a commit object, and try to re-code the
4178 log message into UTF-8 unless otherwise specified. You can
4179 specify the desired output encoding with
4180 <code>i18n.logOutputEncoding</code> in .<code>git/config</code> file, like this:</p>
4181 <div class="listingblock">
4182 <div class="content">
4183 <pre>[i18n]
4184 logOutputEncoding = ISO-8859-1</pre>
4185 </div>
4186 </div>
4187 <div class="paragraph">
4188 <p>If you do not have this configuration variable, the value of
4189 <code>i18n.commitEncoding</code> is used instead.</p>
4190 </div>
4191 </li>
4192 </ol>
4193 </div>
4194 <div class="paragraph">
4195 <p>Note that we deliberately chose not to re-code the commit log
4196 message when a commit is made to force UTF-8 at the commit
4197 object level, because re-coding to UTF-8 is not necessarily a
4198 reversible operation.</p>
4199 </div>
4200 </div>
4201 </div>
4202 <div class="sect1">
4203 <h2 id="_configuration">CONFIGURATION</h2>
4204 <div class="sectionbody">
4205 <div class="paragraph">
4206 <p>See <a href="git-config.html">git-config(1)</a> for core variables and <a href="git-diff.html">git-diff(1)</a>
4207 for settings related to diff generation.</p>
4208 </div>
4209 <div class="dlist">
4210 <dl>
4211 <dt class="hdlist1">format.pretty</dt>
4212 <dd>
4213 <p>Default for the <code>--format</code> option. (See <em>Pretty Formats</em> above.)
4214 Defaults to <code>medium</code>.</p>
4215 </dd>
4216 <dt class="hdlist1">i18n.logOutputEncoding</dt>
4217 <dd>
4218 <p>Encoding to use when displaying logs. (See <em>Discussion</em> above.)
4219 Defaults to the value of <code>i18n.commitEncoding</code> if set, and UTF-8
4220 otherwise.</p>
4221 </dd>
4222 </dl>
4223 </div>
4224 <div class="paragraph">
4225 <p>Everything above this line in this section isn&#8217;t included from the
4226 <a href="git-config.html">git-config(1)</a> documentation. The content that follows is the
4227 same as what&#8217;s found there:</p>
4228 </div>
4229 <div class="dlist">
4230 <dl>
4231 <dt class="hdlist1">log.abbrevCommit</dt>
4232 <dd>
4233 <p>If true, makes <a href="git-log.html">git-log(1)</a>, <a href="git-show.html">git-show(1)</a>, and
4234 <a href="git-whatchanged.html">git-whatchanged(1)</a> assume <code>--abbrev-commit</code>. You may
4235 override this option with <code>--no-abbrev-commit</code>.</p>
4236 </dd>
4237 <dt class="hdlist1">log.date</dt>
4238 <dd>
4239 <p>Set the default date-time mode for the <em>log</em> command.
4240 Setting a value for log.date is similar to using <em>git log</em>'s
4241 <code>--date</code> option. See <a href="git-log.html">git-log(1)</a> for details.</p>
4242 <div class="paragraph">
4243 <p>If the format is set to "auto:foo" and the pager is in use, format
4244 "foo" will be used for the date format. Otherwise, "default" will
4245 be used.</p>
4246 </div>
4247 </dd>
4248 <dt class="hdlist1">log.decorate</dt>
4249 <dd>
4250 <p>Print out the ref names of any commits that are shown by the log
4251 command. If <em>short</em> is specified, the ref name prefixes <em>refs/heads/</em>,
4252 <em>refs/tags/</em> and <em>refs/remotes/</em> will not be printed. If <em>full</em> is
4253 specified, the full ref name (including prefix) will be printed.
4254 If <em>auto</em> is specified, then if the output is going to a terminal,
4255 the ref names are shown as if <em>short</em> were given, otherwise no ref
4256 names are shown. This is the same as the <code>--decorate</code> option
4257 of the <code>git</code> <code>log</code>.</p>
4258 </dd>
4259 <dt class="hdlist1">log.initialDecorationSet</dt>
4260 <dd>
4261 <p>By default, <code>git</code> <code>log</code> only shows decorations for certain known ref
4262 namespaces. If <em>all</em> is specified, then show all refs as
4263 decorations.</p>
4264 </dd>
4265 <dt class="hdlist1">log.excludeDecoration</dt>
4266 <dd>
4267 <p>Exclude the specified patterns from the log decorations. This is
4268 similar to the <code>--decorate-refs-exclude</code> command-line option, but
4269 the config option can be overridden by the <code>--decorate-refs</code>
4270 option.</p>
4271 </dd>
4272 <dt class="hdlist1">log.diffMerges</dt>
4273 <dd>
4274 <p>Set diff format to be used when <code>--diff-merges=on</code> is
4275 specified, see <code>--diff-merges</code> in <a href="git-log.html">git-log(1)</a> for
4276 details. Defaults to <code>separate</code>.</p>
4277 </dd>
4278 <dt class="hdlist1">log.follow</dt>
4279 <dd>
4280 <p>If <code>true</code>, <code>git</code> <code>log</code> will act as if the <code>--follow</code> option was used when
4281 a single &lt;path&gt; is given. This has the same limitations as <code>--follow</code>,
4282 i.e. it cannot be used to follow multiple files and does not work well
4283 on non-linear history.</p>
4284 </dd>
4285 <dt class="hdlist1">log.graphColors</dt>
4286 <dd>
4287 <p>A list of colors, separated by commas, that can be used to draw
4288 history lines in <code>git</code> <code>log</code> <code>--graph</code>.</p>
4289 </dd>
4290 <dt class="hdlist1">log.showRoot</dt>
4291 <dd>
4292 <p>If true, the initial commit will be shown as a big creation event.
4293 This is equivalent to a diff against an empty tree.
4294 Tools like <a href="git-log.html">git-log(1)</a> or <a href="git-whatchanged.html">git-whatchanged(1)</a>, which
4295 normally hide the root commit will now show it. True by default.</p>
4296 </dd>
4297 <dt class="hdlist1">log.showSignature</dt>
4298 <dd>
4299 <p>If true, makes <a href="git-log.html">git-log(1)</a>, <a href="git-show.html">git-show(1)</a>, and
4300 <a href="git-whatchanged.html">git-whatchanged(1)</a> assume <code>--show-signature</code>.</p>
4301 </dd>
4302 <dt class="hdlist1">log.mailmap</dt>
4303 <dd>
4304 <p>If true, makes <a href="git-log.html">git-log(1)</a>, <a href="git-show.html">git-show(1)</a>, and
4305 <a href="git-whatchanged.html">git-whatchanged(1)</a> assume <code>--use-mailmap</code>, otherwise
4306 assume <code>--no-use-mailmap</code>. True by default.</p>
4307 </dd>
4308 <dt class="hdlist1">notes.mergeStrategy</dt>
4309 <dd>
4310 <p>Which merge strategy to choose by default when resolving notes
4311 conflicts. Must be one of <code>manual</code>, <code>ours</code>, <code>theirs</code>, <code>union</code>, or
4312 <code>cat_sort_uniq</code>. Defaults to <code>manual</code>. See the "NOTES MERGE STRATEGIES"
4313 section of <a href="git-notes.html">git-notes(1)</a> for more information on each strategy.</p>
4314 <div class="paragraph">
4315 <p>This setting can be overridden by passing the <code>--strategy</code> option to
4316 <a href="git-notes.html">git-notes(1)</a>.</p>
4317 </div>
4318 </dd>
4319 <dt class="hdlist1">notes.&lt;name&gt;.mergeStrategy</dt>
4320 <dd>
4321 <p>Which merge strategy to choose when doing a notes merge into
4322 refs/notes/&lt;name&gt;. This overrides the more general
4323 "notes.mergeStrategy". See the "NOTES MERGE STRATEGIES" section in
4324 <a href="git-notes.html">git-notes(1)</a> for more information on the available strategies.</p>
4325 </dd>
4326 <dt class="hdlist1">notes.displayRef</dt>
4327 <dd>
4328 <p>Which ref (or refs, if a glob or specified more than once), in
4329 addition to the default set by <code>core.notesRef</code> or
4330 <code>GIT_NOTES_REF</code>, to read notes from when showing commit
4331 messages with the <em>git log</em> family of commands.</p>
4332 <div class="paragraph">
4333 <p>This setting can be overridden with the <code>GIT_NOTES_DISPLAY_REF</code>
4334 environment variable, which must be a colon separated list of refs or
4335 globs.</p>
4336 </div>
4337 <div class="paragraph">
4338 <p>A warning will be issued for refs that do not exist,
4339 but a glob that does not match any refs is silently ignored.</p>
4340 </div>
4341 <div class="paragraph">
4342 <p>This setting can be disabled by the <code>--no-notes</code> option to the <em>git
4343 log</em> family of commands, or by the <code>--notes=</code><em>&lt;ref&gt;</em> option accepted by
4344 those commands.</p>
4345 </div>
4346 <div class="paragraph">
4347 <p>The effective value of "core.notesRef" (possibly overridden by
4348 GIT_NOTES_REF) is also implicitly added to the list of refs to be
4349 displayed.</p>
4350 </div>
4351 </dd>
4352 <dt class="hdlist1">notes.rewrite.&lt;command&gt;</dt>
4353 <dd>
4354 <p>When rewriting commits with &lt;command&gt; (currently <code>amend</code> or
4355 <code>rebase</code>), if this variable is <code>false</code>, git will not copy
4356 notes from the original to the rewritten commit. Defaults to
4357 <code>true</code>. See also "<code>notes.rewriteRef</code>" below.</p>
4358 <div class="paragraph">
4359 <p>This setting can be overridden with the <code>GIT_NOTES_REWRITE_REF</code>
4360 environment variable, which must be a colon separated list of refs or
4361 globs.</p>
4362 </div>
4363 </dd>
4364 <dt class="hdlist1">notes.rewriteMode</dt>
4365 <dd>
4366 <p>When copying notes during a rewrite (see the
4367 "notes.rewrite.&lt;command&gt;" option), determines what to do if
4368 the target commit already has a note. Must be one of
4369 <code>overwrite</code>, <code>concatenate</code>, <code>cat_sort_uniq</code>, or <code>ignore</code>.
4370 Defaults to <code>concatenate</code>.</p>
4371 <div class="paragraph">
4372 <p>This setting can be overridden with the <code>GIT_NOTES_REWRITE_MODE</code>
4373 environment variable.</p>
4374 </div>
4375 </dd>
4376 <dt class="hdlist1">notes.rewriteRef</dt>
4377 <dd>
4378 <p>When copying notes during a rewrite, specifies the (fully
4379 qualified) ref whose notes should be copied. May be a glob,
4380 in which case notes in all matching refs will be copied. You
4381 may also specify this configuration several times.</p>
4382 <div class="paragraph">
4383 <p>Does not have a default value; you must configure this variable to
4384 enable note rewriting. Set it to <code>refs/notes/commits</code> to enable
4385 rewriting for the default commit notes.</p>
4386 </div>
4387 <div class="paragraph">
4388 <p>Can be overridden with the <code>GIT_NOTES_REWRITE_REF</code> environment variable.
4389 See <code>notes.rewrite.</code><em>&lt;command&gt;</em> above for a further description of its format.</p>
4390 </div>
4391 </dd>
4392 </dl>
4393 </div>
4394 </div>
4395 </div>
4396 <div class="sect1">
4397 <h2 id="_git">GIT</h2>
4398 <div class="sectionbody">
4399 <div class="paragraph">
4400 <p>Part of the <a href="git.html">git(1)</a> suite</p>
4401 </div>
4402 </div>
4403 </div>
4404 </div>
4405 <div id="footer">
4406 <div id="footer-text">
4407 Last updated 2023-10-23 14:43:46 -0700
4408 </div>
4409 </div>
4410 </body>
4411 </html>