Autogenerated HTML docs for v2.47.0-365-gcc01ba
[git-htmldocs.git] / git-diff-files.html
blobc4d215473e6aa5f78fd6f7a9b8f41e8ea1397398
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-diff-files(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-diff-files(1) Manual Page</h1>
444 <h2 id="_name">NAME</h2>
445 <div class="sectionbody">
446 <p>git-diff-files - Compares files in the working tree and the index</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 diff-files</em> [-q] [-0 | -1 | -2 | -3 | -c | --cc] [&lt;common-diff-options&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>Compares the files in the working tree and the index. When paths
463 are specified, compares only those named paths. Otherwise all
464 entries in the index are compared. The output format is the
465 same as for <em>git diff-index</em> and <em>git diff-tree</em>.</p>
466 </div>
467 </div>
468 </div>
469 <div class="sect1">
470 <h2 id="_options">OPTIONS</h2>
471 <div class="sectionbody">
472 <div class="dlist">
473 <dl>
474 <dt class="hdlist1">-p</dt>
475 <dt class="hdlist1">-u</dt>
476 <dt class="hdlist1">--patch</dt>
477 <dd>
478 <p>Generate patch (see <a href="#generate_patch_text_with_p">Generating patch text with -p</a>).</p>
479 </dd>
480 <dt class="hdlist1">-s</dt>
481 <dt class="hdlist1">--no-patch</dt>
482 <dd>
483 <p>Suppress all output from the diff machinery. Useful for
484 commands like <code>git</code> <code>show</code> that show the patch by default to
485 squelch their output, or to cancel the effect of options like
486 <code>--patch</code>, <code>--stat</code> earlier on the command line in an alias.</p>
487 </dd>
488 <dt class="hdlist1">-U&lt;n&gt;</dt>
489 <dt class="hdlist1">--unified=&lt;n&gt;</dt>
490 <dd>
491 <p>Generate diffs with &lt;n&gt; lines of context instead of
492 the usual three.
493 Implies <code>--patch</code>.</p>
494 </dd>
495 <dt class="hdlist1">--output=&lt;file&gt;</dt>
496 <dd>
497 <p>Output to a specific file instead of stdout.</p>
498 </dd>
499 <dt class="hdlist1">--output-indicator-new=&lt;char&gt;</dt>
500 <dt class="hdlist1">--output-indicator-old=&lt;char&gt;</dt>
501 <dt class="hdlist1">--output-indicator-context=&lt;char&gt;</dt>
502 <dd>
503 <p>Specify the character used to indicate new, old or context
504 lines in the generated patch. Normally they are <em>+</em>, <em>-</em> and
505 ' ' respectively.</p>
506 </dd>
507 <dt class="hdlist1">--raw</dt>
508 <dd>
509 <p>Generate the diff in raw format.
510 This is the default.</p>
511 </dd>
512 <dt class="hdlist1">--patch-with-raw</dt>
513 <dd>
514 <p>Synonym for <code>-p</code> <code>--raw</code>.</p>
515 </dd>
516 <dt class="hdlist1">--indent-heuristic</dt>
517 <dd>
518 <p>Enable the heuristic that shifts diff hunk boundaries to make patches
519 easier to read. This is the default.</p>
520 </dd>
521 <dt class="hdlist1">--no-indent-heuristic</dt>
522 <dd>
523 <p>Disable the indent heuristic.</p>
524 </dd>
525 <dt class="hdlist1">--minimal</dt>
526 <dd>
527 <p>Spend extra time to make sure the smallest possible
528 diff is produced.</p>
529 </dd>
530 <dt class="hdlist1">--patience</dt>
531 <dd>
532 <p>Generate a diff using the "patience diff" algorithm.</p>
533 </dd>
534 <dt class="hdlist1">--histogram</dt>
535 <dd>
536 <p>Generate a diff using the "histogram diff" algorithm.</p>
537 </dd>
538 <dt class="hdlist1">--anchored=&lt;text&gt;</dt>
539 <dd>
540 <p>Generate a diff using the "anchored diff" algorithm.</p>
541 <div class="paragraph">
542 <p>This option may be specified more than once.</p>
543 </div>
544 <div class="paragraph">
545 <p>If a line exists in both the source and destination, exists only once,
546 and starts with this text, this algorithm attempts to prevent it from
547 appearing as a deletion or addition in the output. It uses the "patience
548 diff" algorithm internally.</p>
549 </div>
550 </dd>
551 <dt class="hdlist1">--diff-algorithm={patience|minimal|histogram|myers}</dt>
552 <dd>
553 <p>Choose a diff algorithm. The variants are as follows:</p>
554 <div class="openblock">
555 <div class="content">
556 <div class="dlist">
557 <dl>
558 <dt class="hdlist1"><code>default</code>, <code>myers</code></dt>
559 <dd>
560 <p>The basic greedy diff algorithm. Currently, this is the default.</p>
561 </dd>
562 <dt class="hdlist1"><code>minimal</code></dt>
563 <dd>
564 <p>Spend extra time to make sure the smallest possible diff is
565 produced.</p>
566 </dd>
567 <dt class="hdlist1"><code>patience</code></dt>
568 <dd>
569 <p>Use "patience diff" algorithm when generating patches.</p>
570 </dd>
571 <dt class="hdlist1"><code>histogram</code></dt>
572 <dd>
573 <p>This algorithm extends the patience algorithm to "support
574 low-occurrence common elements".</p>
575 </dd>
576 </dl>
577 </div>
578 </div>
579 </div>
580 <div class="paragraph">
581 <p>For instance, if you configured the <code>diff.algorithm</code> variable to a
582 non-default value and want to use the default one, then you
583 have to use <code>--diff-algorithm=default</code> option.</p>
584 </div>
585 </dd>
586 <dt class="hdlist1">--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]</dt>
587 <dd>
588 <p>Generate a diffstat. By default, as much space as necessary
589 will be used for the filename part, and the rest for the graph
590 part. Maximum width defaults to terminal width, or 80 columns
591 if not connected to a terminal, and can be overridden by
592 <em>&lt;width&gt;</em>. The width of the filename part can be limited by
593 giving another width <em>&lt;name-width&gt;</em> after a comma or by setting
594 <code>diff.statNameWidth=</code><em>&lt;width&gt;</em>. The width of the graph part can be
595 limited by using <code>--stat-graph-width=</code><em>&lt;width&gt;</em> or by setting
596 <code>diff.statGraphWidth=</code><em>&lt;width&gt;</em>. Using <code>--stat</code> or
597 <code>--stat-graph-width</code> affects all commands generating a stat graph,
598 while setting <code>diff.statNameWidth</code> or <code>diff.statGraphWidth</code>
599 does not affect <code>git</code> <code>format-patch</code>.
600 By giving a third parameter <em>&lt;count&gt;</em>, you can limit the output to
601 the first <em>&lt;count&gt;</em> lines, followed by ... if there are more.</p>
602 <div class="paragraph">
603 <p>These parameters can also be set individually with <code>--stat-width=</code><em>&lt;width&gt;</em>,
604 <code>--stat-name-width=</code><em>&lt;name-width&gt;</em> and <code>--stat-count=</code><em>&lt;count&gt;</em>.</p>
605 </div>
606 </dd>
607 <dt class="hdlist1">--compact-summary</dt>
608 <dd>
609 <p>Output a condensed summary of extended header information such
610 as file creations or deletions ("new" or "gone", optionally "+l"
611 if it&#8217;s a symlink) and mode changes ("+x" or "-x" for adding
612 or removing executable bit respectively) in diffstat. The
613 information is put between the filename part and the graph
614 part. Implies <code>--stat</code>.</p>
615 </dd>
616 <dt class="hdlist1">--numstat</dt>
617 <dd>
618 <p>Similar to <code>--stat</code>, but shows number of added and
619 deleted lines in decimal notation and pathname without
620 abbreviation, to make it more machine friendly. For
621 binary files, outputs two <code>-</code> instead of saying
622 <code>0</code> <code>0</code>.</p>
623 </dd>
624 <dt class="hdlist1">--shortstat</dt>
625 <dd>
626 <p>Output only the last line of the <code>--stat</code> format containing total
627 number of modified files, as well as number of added and deleted
628 lines.</p>
629 </dd>
630 <dt class="hdlist1">-X[&lt;param1,param2,&#8230;&#8203;&gt;]</dt>
631 <dt class="hdlist1">--dirstat[=&lt;param1,param2,&#8230;&#8203;&gt;]</dt>
632 <dd>
633 <p>Output the distribution of relative amount of changes for each
634 sub-directory. The behavior of <code>--dirstat</code> can be customized by
635 passing it a comma separated list of parameters.
636 The defaults are controlled by the <code>diff.dirstat</code> configuration
637 variable (see <a href="git-config.html">git-config(1)</a>).
638 The following parameters are available:</p>
639 <div class="openblock">
640 <div class="content">
641 <div class="dlist">
642 <dl>
643 <dt class="hdlist1"><code>changes</code></dt>
644 <dd>
645 <p>Compute the dirstat numbers by counting the lines that have been
646 removed from the source, or added to the destination. This ignores
647 the amount of pure code movements within a file. In other words,
648 rearranging lines in a file is not counted as much as other changes.
649 This is the default behavior when no parameter is given.</p>
650 </dd>
651 <dt class="hdlist1"><code>lines</code></dt>
652 <dd>
653 <p>Compute the dirstat numbers by doing the regular line-based diff
654 analysis, and summing the removed/added line counts. (For binary
655 files, count 64-byte chunks instead, since binary files have no
656 natural concept of lines). This is a more expensive <code>--dirstat</code>
657 behavior than the <code>changes</code> behavior, but it does count rearranged
658 lines within a file as much as other changes. The resulting output
659 is consistent with what you get from the other <code>--</code>*stat options.</p>
660 </dd>
661 <dt class="hdlist1"><code>files</code></dt>
662 <dd>
663 <p>Compute the dirstat numbers by counting the number of files changed.
664 Each changed file counts equally in the dirstat analysis. This is
665 the computationally cheapest <code>--dirstat</code> behavior, since it does
666 not have to look at the file contents at all.</p>
667 </dd>
668 <dt class="hdlist1"><code>cumulative</code></dt>
669 <dd>
670 <p>Count changes in a child directory for the parent directory as well.
671 Note that when using <code>cumulative</code>, the sum of the percentages
672 reported may exceed 100%. The default (non-cumulative) behavior can
673 be specified with the <code>noncumulative</code> parameter.</p>
674 </dd>
675 <dt class="hdlist1">&lt;limit&gt;</dt>
676 <dd>
677 <p>An integer parameter specifies a cut-off percent (3% by default).
678 Directories contributing less than this percentage of the changes
679 are not shown in the output.</p>
680 </dd>
681 </dl>
682 </div>
683 </div>
684 </div>
685 <div class="paragraph">
686 <p>Example: The following will count changed files, while ignoring
687 directories with less than 10% of the total amount of changed files,
688 and accumulating child directory counts in the parent directories:
689 <code>--dirstat=files,10,cumulative</code>.</p>
690 </div>
691 </dd>
692 <dt class="hdlist1">--cumulative</dt>
693 <dd>
694 <p>Synonym for --dirstat=cumulative</p>
695 </dd>
696 <dt class="hdlist1">--dirstat-by-file[=&lt;param1,param2&gt;&#8230;&#8203;]</dt>
697 <dd>
698 <p>Synonym for --dirstat=files,&lt;param1&gt;,&lt;param2&gt;&#8230;&#8203;</p>
699 </dd>
700 <dt class="hdlist1">--summary</dt>
701 <dd>
702 <p>Output a condensed summary of extended header information
703 such as creations, renames and mode changes.</p>
704 </dd>
705 <dt class="hdlist1">--patch-with-stat</dt>
706 <dd>
707 <p>Synonym for <code>-p</code> <code>--stat</code>.</p>
708 </dd>
709 <dt class="hdlist1">-z</dt>
710 <dd>
711 <p>When <code>--raw</code>, <code>--numstat</code>, <code>--name-only</code> or <code>--name-status</code> has been
712 given, do not munge pathnames and use NULs as output field terminators.</p>
713 <div class="paragraph">
714 <p>Without this option, pathnames with "unusual" characters are quoted as
715 explained for the configuration variable <code>core.quotePath</code> (see
716 <a href="git-config.html">git-config(1)</a>).</p>
717 </div>
718 </dd>
719 <dt class="hdlist1">--name-only</dt>
720 <dd>
721 <p>Show only the name of each changed file in the post-image tree.
722 The file names are often encoded in UTF-8.
723 For more information see the discussion about encoding in the <a href="git-log.html">git-log(1)</a>
724 manual page.</p>
725 </dd>
726 <dt class="hdlist1">--name-status</dt>
727 <dd>
728 <p>Show only the name(s) and status of each changed file. See the description
729 of the <code>--diff-filter</code> option on what the status letters mean.
730 Just like <code>--name-only</code> the file names are often encoded in UTF-8.</p>
731 </dd>
732 <dt class="hdlist1">--submodule[=&lt;format&gt;]</dt>
733 <dd>
734 <p>Specify how differences in submodules are shown. When specifying
735 <code>--submodule=short</code> the <em>short</em> format is used. This format just
736 shows the names of the commits at the beginning and end of the range.
737 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em>
738 format is used. This format lists the commits in the range like
739 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
740 is specified, the <em>diff</em> format is used. This format shows an
741 inline diff of the changes in the submodule contents between the
742 commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format
743 if the config option is unset.</p>
744 </dd>
745 <dt class="hdlist1">--color[=&lt;when&gt;]</dt>
746 <dd>
747 <p>Show colored diff.
748 <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
749 <em>&lt;when&gt;</em> can be one of <code>always</code>, <code>never</code>, or <code>auto</code>.</p>
750 </dd>
751 <dt class="hdlist1">--no-color</dt>
752 <dd>
753 <p>Turn off colored diff.
754 It is the same as <code>--color=never</code>.</p>
755 </dd>
756 <dt class="hdlist1">--color-moved[=&lt;mode&gt;]</dt>
757 <dd>
758 <p>Moved lines of code are colored differently.
759 The &lt;mode&gt; defaults to <em>no</em> if the option is not given
760 and to <em>zebra</em> if the option with no mode is given.
761 The mode must be one of:</p>
762 <div class="openblock">
763 <div class="content">
764 <div class="dlist">
765 <dl>
766 <dt class="hdlist1">no</dt>
767 <dd>
768 <p>Moved lines are not highlighted.</p>
769 </dd>
770 <dt class="hdlist1">default</dt>
771 <dd>
772 <p>Is a synonym for <code>zebra</code>. This may change to a more sensible mode
773 in the future.</p>
774 </dd>
775 <dt class="hdlist1">plain</dt>
776 <dd>
777 <p>Any line that is added in one location and was removed
778 in another location will be colored with <em>color.diff.newMoved</em>.
779 Similarly <em>color.diff.oldMoved</em> will be used for removed lines
780 that are added somewhere else in the diff. This mode picks up any
781 moved line, but it is not very useful in a review to determine
782 if a block of code was moved without permutation.</p>
783 </dd>
784 <dt class="hdlist1">blocks</dt>
785 <dd>
786 <p>Blocks of moved text of at least 20 alphanumeric characters
787 are detected greedily. The detected blocks are
788 painted using either the <em>color.diff.{old,new}Moved</em> color.
789 Adjacent blocks cannot be told apart.</p>
790 </dd>
791 <dt class="hdlist1">zebra</dt>
792 <dd>
793 <p>Blocks of moved text are detected as in <em>blocks</em> mode. The blocks
794 are painted using either the <em>color.diff.{old,new}Moved</em> color or
795 <em>color.diff.{old,new}MovedAlternative</em>. The change between
796 the two colors indicates that a new block was detected.</p>
797 </dd>
798 <dt class="hdlist1">dimmed-zebra</dt>
799 <dd>
800 <p>Similar to <em>zebra</em>, but additional dimming of uninteresting parts
801 of moved code is performed. The bordering lines of two adjacent
802 blocks are considered interesting, the rest is uninteresting.
803 <code>dimmed_zebra</code> is a deprecated synonym.</p>
804 </dd>
805 </dl>
806 </div>
807 </div>
808 </div>
809 </dd>
810 <dt class="hdlist1">--no-color-moved</dt>
811 <dd>
812 <p>Turn off move detection. This can be used to override configuration
813 settings. It is the same as <code>--color-moved=no</code>.</p>
814 </dd>
815 <dt class="hdlist1">--color-moved-ws=&lt;modes&gt;</dt>
816 <dd>
817 <p>This configures how whitespace is ignored when performing the
818 move detection for <code>--color-moved</code>.
819 These modes can be given as a comma separated list:</p>
820 <div class="openblock">
821 <div class="content">
822 <div class="dlist">
823 <dl>
824 <dt class="hdlist1">no</dt>
825 <dd>
826 <p>Do not ignore whitespace when performing move detection.</p>
827 </dd>
828 <dt class="hdlist1">ignore-space-at-eol</dt>
829 <dd>
830 <p>Ignore changes in whitespace at EOL.</p>
831 </dd>
832 <dt class="hdlist1">ignore-space-change</dt>
833 <dd>
834 <p>Ignore changes in amount of whitespace. This ignores whitespace
835 at line end, and considers all other sequences of one or
836 more whitespace characters to be equivalent.</p>
837 </dd>
838 <dt class="hdlist1">ignore-all-space</dt>
839 <dd>
840 <p>Ignore whitespace when comparing lines. This ignores differences
841 even if one line has whitespace where the other line has none.</p>
842 </dd>
843 <dt class="hdlist1">allow-indentation-change</dt>
844 <dd>
845 <p>Initially ignore any whitespace in the move detection, then
846 group the moved code blocks only into a block if the change in
847 whitespace is the same per line. This is incompatible with the
848 other modes.</p>
849 </dd>
850 </dl>
851 </div>
852 </div>
853 </div>
854 </dd>
855 <dt class="hdlist1">--no-color-moved-ws</dt>
856 <dd>
857 <p>Do not ignore whitespace when performing move detection. This can be
858 used to override configuration settings. It is the same as
859 <code>--color-moved-ws=no</code>.</p>
860 </dd>
861 <dt class="hdlist1">--word-diff[=&lt;mode&gt;]</dt>
862 <dd>
863 <p>Show a word diff, using the &lt;mode&gt; to delimit changed words.
864 By default, words are delimited by whitespace; see
865 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
866 must be one of:</p>
867 <div class="openblock">
868 <div class="content">
869 <div class="dlist">
870 <dl>
871 <dt class="hdlist1">color</dt>
872 <dd>
873 <p>Highlight changed words using only colors. Implies <code>--color</code>.</p>
874 </dd>
875 <dt class="hdlist1">plain</dt>
876 <dd>
877 <p>Show words as [<code>-removed-</code>] and {+added+}. Makes no
878 attempts to escape the delimiters if they appear in the input,
879 so the output may be ambiguous.</p>
880 </dd>
881 <dt class="hdlist1">porcelain</dt>
882 <dd>
883 <p>Use a special line-based format intended for script
884 consumption. Added/removed/unchanged runs are printed in the
885 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
886 character at the beginning of the line and extending to the
887 end of the line. Newlines in the input are represented by a
888 tilde <code>~</code> on a line of its own.</p>
889 </dd>
890 <dt class="hdlist1">none</dt>
891 <dd>
892 <p>Disable word diff again.</p>
893 </dd>
894 </dl>
895 </div>
896 </div>
897 </div>
898 <div class="paragraph">
899 <p>Note that despite the name of the first mode, color is used to
900 highlight the changed parts in all modes if enabled.</p>
901 </div>
902 </dd>
903 <dt class="hdlist1">--word-diff-regex=&lt;regex&gt;</dt>
904 <dd>
905 <p>Use &lt;regex&gt; to decide what a word is, instead of considering
906 runs of non-whitespace to be a word. Also implies
907 <code>--word-diff</code> unless it was already enabled.</p>
908 <div class="paragraph">
909 <p>Every non-overlapping match of the
910 &lt;regex&gt; is considered a word. Anything between these matches is
911 considered whitespace and ignored(!) for the purposes of finding
912 differences. You may want to append |[<code>^</code>[<code>:space:</code>]] to your regular
913 expression to make sure that it matches all non-whitespace characters.
914 A match that contains a newline is silently truncated(!) at the
915 newline.</p>
916 </div>
917 <div class="paragraph">
918 <p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
919 and, correspondingly, show differences character by character.</p>
920 </div>
921 <div class="paragraph">
922 <p>The regex can also be set via a diff driver or configuration option, see
923 <a href="gitattributes.html">gitattributes(5)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly
924 overrides any diff driver or configuration setting. Diff drivers
925 override configuration settings.</p>
926 </div>
927 </dd>
928 <dt class="hdlist1">--color-words[=&lt;regex&gt;]</dt>
929 <dd>
930 <p>Equivalent to <code>--word-diff=color</code> plus (if a regex was
931 specified) <code>--word-diff-regex=</code><em>&lt;regex&gt;</em>.</p>
932 </dd>
933 <dt class="hdlist1">--no-renames</dt>
934 <dd>
935 <p>Turn off rename detection, even when the configuration
936 file gives the default to do so.</p>
937 </dd>
938 <dt class="hdlist1">--[no-]rename-empty</dt>
939 <dd>
940 <p>Whether to use empty blobs as rename source.</p>
941 </dd>
942 <dt class="hdlist1">--check</dt>
943 <dd>
944 <p>Warn if changes introduce conflict markers or whitespace errors.
945 What are considered whitespace errors is controlled by <code>core.whitespace</code>
946 configuration. By default, trailing whitespaces (including
947 lines that consist solely of whitespaces) and a space character
948 that is immediately followed by a tab character inside the
949 initial indent of the line are considered whitespace errors.
950 Exits with non-zero status if problems are found. Not compatible
951 with --exit-code.</p>
952 </dd>
953 <dt class="hdlist1">--ws-error-highlight=&lt;kind&gt;</dt>
954 <dd>
955 <p>Highlight whitespace errors in the <code>context</code>, <code>old</code> or <code>new</code>
956 lines of the diff. Multiple values are separated by comma,
957 <code>none</code> resets previous values, <code>default</code> reset the list to
958 <code>new</code> and <code>all</code> is a shorthand for <code>old,new,context</code>. When
959 this option is not given, and the configuration variable
960 <code>diff.wsErrorHighlight</code> is not set, only whitespace errors in
961 <code>new</code> lines are highlighted. The whitespace errors are colored
962 with <code>color.diff.whitespace</code>.</p>
963 </dd>
964 <dt class="hdlist1">--full-index</dt>
965 <dd>
966 <p>Instead of the first handful of characters, show the full
967 pre- and post-image blob object names on the "index"
968 line when generating patch format output.</p>
969 </dd>
970 <dt class="hdlist1">--binary</dt>
971 <dd>
972 <p>In addition to <code>--full-index</code>, output a binary diff that
973 can be applied with <code>git-apply</code>.
974 Implies <code>--patch</code>.</p>
975 </dd>
976 <dt class="hdlist1">--abbrev[=&lt;n&gt;]</dt>
977 <dd>
978 <p>Instead of showing the full 40-byte hexadecimal object
979 name in diff-raw format output and diff-tree header
980 lines, show the shortest prefix that is at least <em>&lt;n&gt;</em>
981 hexdigits long that uniquely refers the object.
982 In diff-patch output format, <code>--full-index</code> takes higher
983 precedence, i.e. if <code>--full-index</code> is specified, full blob
984 names will be shown regardless of <code>--abbrev</code>.
985 Non default number of digits can be specified with <code>--abbrev=</code><em>&lt;n&gt;</em>.</p>
986 </dd>
987 <dt class="hdlist1">-B[&lt;n&gt;][/&lt;m&gt;]</dt>
988 <dt class="hdlist1">--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]</dt>
989 <dd>
990 <p>Break complete rewrite changes into pairs of delete and
991 create. This serves two purposes:</p>
992 <div class="paragraph">
993 <p>It affects the way a change that amounts to a total rewrite of a file
994 not as a series of deletion and insertion mixed together with a very
995 few lines that happen to match textually as the context, but as a
996 single deletion of everything old followed by a single insertion of
997 everything new, and the number <code>m</code> controls this aspect of the -B
998 option (defaults to 60%). <code>-B/70</code>% specifies that less than 30% of the
999 original should remain in the result for Git to consider it a total
1000 rewrite (i.e. otherwise the resulting patch will be a series of
1001 deletion and insertion mixed together with context lines).</p>
1002 </div>
1003 <div class="paragraph">
1004 <p>When used with -M, a totally-rewritten file is also considered as the
1005 source of a rename (usually -M only considers a file that disappeared
1006 as the source of a rename), and the number <code>n</code> controls this aspect of
1007 the -B option (defaults to 50%). <code>-B20</code>% specifies that a change with
1008 addition and deletion compared to 20% or more of the file&#8217;s size are
1009 eligible for being picked up as a possible source of a rename to
1010 another file.</p>
1011 </div>
1012 </dd>
1013 <dt class="hdlist1">-M[&lt;n&gt;]</dt>
1014 <dt class="hdlist1">--find-renames[=&lt;n&gt;]</dt>
1015 <dd>
1016 <p>Detect renames.
1017 If <code>n</code> is specified, it is a threshold on the similarity
1018 index (i.e. amount of addition/deletions compared to the
1019 file&#8217;s size). For example, <code>-M90</code>% means Git should consider a
1020 delete/add pair to be a rename if more than 90% of the file
1021 hasn&#8217;t changed. Without a % sign, the number is to be read as
1022 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
1023 0.5, and is thus the same as <code>-M50</code>%. Similarly, <code>-M05</code> is
1024 the same as <code>-M5</code>%. To limit detection to exact renames, use
1025 <code>-M100</code>%. The default similarity index is 50%.</p>
1026 </dd>
1027 <dt class="hdlist1">-C[&lt;n&gt;]</dt>
1028 <dt class="hdlist1">--find-copies[=&lt;n&gt;]</dt>
1029 <dd>
1030 <p>Detect copies as well as renames. See also <code>--find-copies-harder</code>.
1031 If <code>n</code> is specified, it has the same meaning as for <code>-M</code><em>&lt;n&gt;</em>.</p>
1032 </dd>
1033 <dt class="hdlist1">--find-copies-harder</dt>
1034 <dd>
1035 <p>For performance reasons, by default, <code>-C</code> option finds copies only
1036 if the original file of the copy was modified in the same
1037 changeset. This flag makes the command
1038 inspect unmodified files as candidates for the source of
1039 copy. This is a very expensive operation for large
1040 projects, so use it with caution. Giving more than one
1041 <code>-C</code> option has the same effect.</p>
1042 </dd>
1043 <dt class="hdlist1">-D</dt>
1044 <dt class="hdlist1">--irreversible-delete</dt>
1045 <dd>
1046 <p>Omit the preimage for deletes, i.e. print only the header but not
1047 the diff between the preimage and <code>/dev/null</code>. The resulting patch
1048 is not meant to be applied with <code>patch</code> or <code>git</code> <code>apply</code>; this is
1049 solely for people who want to just concentrate on reviewing the
1050 text after the change. In addition, the output obviously lacks
1051 enough information to apply such a patch in reverse, even manually,
1052 hence the name of the option.</p>
1053 <div class="paragraph">
1054 <p>When used together with <code>-B</code>, omit also the preimage in the deletion part
1055 of a delete/create pair.</p>
1056 </div>
1057 </dd>
1058 <dt class="hdlist1">-l&lt;num&gt;</dt>
1059 <dd>
1060 <p>The <code>-M</code> and <code>-C</code> options involve some preliminary steps that
1061 can detect subsets of renames/copies cheaply, followed by an
1062 exhaustive fallback portion that compares all remaining
1063 unpaired destinations to all relevant sources. (For renames,
1064 only remaining unpaired sources are relevant; for copies, all
1065 original sources are relevant.) For N sources and
1066 destinations, this exhaustive check is O(N^2). This option
1067 prevents the exhaustive portion of rename/copy detection from
1068 running if the number of source/destination files involved
1069 exceeds the specified number. Defaults to diff.renameLimit.
1070 Note that a value of 0 is treated as unlimited.</p>
1071 </dd>
1072 <dt class="hdlist1">--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;&#8203;[*]]</dt>
1073 <dd>
1074 <p>Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
1075 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
1076 type (i.e. regular file, symlink, submodule, &#8230;&#8203;) changed (<code>T</code>),
1077 are Unmerged (<code>U</code>), are
1078 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
1079 Any combination of the filter characters (including none) can be used.
1080 When * (All-or-none) is added to the combination, all
1081 paths are selected if there is any file that matches
1082 other criteria in the comparison; if there is no file
1083 that matches other criteria, nothing is selected.</p>
1084 <div class="paragraph">
1085 <p>Also, these upper-case letters can be downcased to exclude. E.g.
1086 <code>--diff-filter=ad</code> excludes added and deleted paths.</p>
1087 </div>
1088 <div class="paragraph">
1089 <p>Note that not all diffs can feature all types. For instance, copied and
1090 renamed entries cannot appear if detection for those types is disabled.</p>
1091 </div>
1092 </dd>
1093 <dt class="hdlist1">-S&lt;string&gt;</dt>
1094 <dd>
1095 <p>Look for differences that change the number of occurrences of
1096 the specified string (i.e. addition/deletion) in a file.
1097 Intended for the scripter&#8217;s use.</p>
1098 <div class="paragraph">
1099 <p>It is useful when you&#8217;re looking for an exact block of code (like a
1100 struct), and want to know the history of that block since it first
1101 came into being: use the feature iteratively to feed the interesting
1102 block in the preimage back into <code>-S</code>, and keep going until you get the
1103 very first version of the block.</p>
1104 </div>
1105 <div class="paragraph">
1106 <p>Binary files are searched as well.</p>
1107 </div>
1108 </dd>
1109 <dt class="hdlist1">-G&lt;regex&gt;</dt>
1110 <dd>
1111 <p>Look for differences whose patch text contains added/removed
1112 lines that match &lt;regex&gt;.</p>
1113 <div class="paragraph">
1114 <p>To illustrate the difference between <code>-S</code><em>&lt;regex&gt;</em> <code>--pickaxe-regex</code> and
1115 <code>-G</code><em>&lt;regex&gt;</em>, consider a commit with the following diff in the same
1116 file:</p>
1117 </div>
1118 <div class="listingblock">
1119 <div class="content">
1120 <pre>+ return frotz(nitfol, two-&gt;ptr, 1, 0);
1122 - hit = frotz(nitfol, mf2.ptr, 1, 0);</pre>
1123 </div>
1124 </div>
1125 <div class="paragraph">
1126 <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>
1127 <code>-S</code>"frotz\(<code>nitfol</code>" <code>--pickaxe-regex</code> will not (because the number of
1128 occurrences of that string did not change).</p>
1129 </div>
1130 <div class="paragraph">
1131 <p>Unless <code>--text</code> is supplied patches of binary files without a textconv
1132 filter will be ignored.</p>
1133 </div>
1134 <div class="paragraph">
1135 <p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
1136 information.</p>
1137 </div>
1138 </dd>
1139 <dt class="hdlist1">--find-object=&lt;object-id&gt;</dt>
1140 <dd>
1141 <p>Look for differences that change the number of occurrences of
1142 the specified object. Similar to <code>-S</code>, just the argument is different
1143 in that it doesn&#8217;t search for a specific string but for a specific
1144 object id.</p>
1145 <div class="paragraph">
1146 <p>The object can be a blob or a submodule commit. It implies the <code>-t</code> option in
1147 <code>git-log</code> to also find trees.</p>
1148 </div>
1149 </dd>
1150 <dt class="hdlist1">--pickaxe-all</dt>
1151 <dd>
1152 <p>When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
1153 changeset, not just the files that contain the change
1154 in &lt;string&gt;.</p>
1155 </dd>
1156 <dt class="hdlist1">--pickaxe-regex</dt>
1157 <dd>
1158 <p>Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
1159 expression to match.</p>
1160 </dd>
1161 <dt class="hdlist1">-O&lt;orderfile&gt;</dt>
1162 <dd>
1163 <p>Control the order in which files appear in the output.
1164 This overrides the <code>diff.orderFile</code> configuration variable
1165 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
1166 use <code>-O/dev/null</code>.</p>
1167 <div class="paragraph">
1168 <p>The output order is determined by the order of glob patterns in
1169 &lt;orderfile&gt;.
1170 All files with pathnames that match the first pattern are output
1171 first, all files with pathnames that match the second pattern (but not
1172 the first) are output next, and so on.
1173 All files with pathnames that do not match any pattern are output
1174 last, as if there was an implicit match-all pattern at the end of the
1175 file.
1176 If multiple pathnames have the same rank (they match the same pattern
1177 but no earlier patterns), their output order relative to each other is
1178 the normal order.</p>
1179 </div>
1180 <div class="paragraph">
1181 <p>&lt;orderfile&gt; is parsed as follows:</p>
1182 </div>
1183 <div class="openblock">
1184 <div class="content">
1185 <div class="ulist">
1186 <ul>
1187 <li>
1188 <p>Blank lines are ignored, so they can be used as separators for
1189 readability.</p>
1190 </li>
1191 <li>
1192 <p>Lines starting with a hash ("#") are ignored, so they can be used
1193 for comments. Add a backslash ("\") to the beginning of the
1194 pattern if it starts with a hash.</p>
1195 </li>
1196 <li>
1197 <p>Each other line contains a single pattern.</p>
1198 </li>
1199 </ul>
1200 </div>
1201 </div>
1202 </div>
1203 <div class="paragraph">
1204 <p>Patterns have the same syntax and semantics as patterns used for
1205 fnmatch(3) without the FNM_PATHNAME flag, except a pathname also
1206 matches a pattern if removing any number of the final pathname
1207 components matches the pattern. For example, the pattern "<code>foo</code>*bar"
1208 matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p>
1209 </div>
1210 </dd>
1211 <dt class="hdlist1">--skip-to=&lt;file&gt;</dt>
1212 <dt class="hdlist1">--rotate-to=&lt;file&gt;</dt>
1213 <dd>
1214 <p>Discard the files before the named &lt;file&gt; from the output
1215 (i.e. <em>skip to</em>), or move them to the end of the output
1216 (i.e. <em>rotate to</em>). These options were invented primarily for the use
1217 of the <code>git</code> <code>difftool</code> command, and may not be very useful
1218 otherwise.</p>
1219 </dd>
1220 <dt class="hdlist1">-R</dt>
1221 <dd>
1222 <p>Swap two inputs; that is, show differences from index or
1223 on-disk file to tree contents.</p>
1224 </dd>
1225 <dt class="hdlist1">--relative[=&lt;path&gt;]</dt>
1226 <dt class="hdlist1">--no-relative</dt>
1227 <dd>
1228 <p>When run from a subdirectory of the project, it can be
1229 told to exclude changes outside the directory and show
1230 pathnames relative to it with this option. When you are
1231 not in a subdirectory (e.g. in a bare repository), you
1232 can name which subdirectory to make the output relative
1233 to by giving a &lt;path&gt; as an argument.
1234 <code>--no-relative</code> can be used to countermand both <code>diff.relative</code> config
1235 option and previous <code>--relative</code>.</p>
1236 </dd>
1237 <dt class="hdlist1">-a</dt>
1238 <dt class="hdlist1">--text</dt>
1239 <dd>
1240 <p>Treat all files as text.</p>
1241 </dd>
1242 <dt class="hdlist1">--ignore-cr-at-eol</dt>
1243 <dd>
1244 <p>Ignore carriage-return at the end of line when doing a comparison.</p>
1245 </dd>
1246 <dt class="hdlist1">--ignore-space-at-eol</dt>
1247 <dd>
1248 <p>Ignore changes in whitespace at EOL.</p>
1249 </dd>
1250 <dt class="hdlist1">-b</dt>
1251 <dt class="hdlist1">--ignore-space-change</dt>
1252 <dd>
1253 <p>Ignore changes in amount of whitespace. This ignores whitespace
1254 at line end, and considers all other sequences of one or
1255 more whitespace characters to be equivalent.</p>
1256 </dd>
1257 <dt class="hdlist1">-w</dt>
1258 <dt class="hdlist1">--ignore-all-space</dt>
1259 <dd>
1260 <p>Ignore whitespace when comparing lines. This ignores
1261 differences even if one line has whitespace where the other
1262 line has none.</p>
1263 </dd>
1264 <dt class="hdlist1">--ignore-blank-lines</dt>
1265 <dd>
1266 <p>Ignore changes whose lines are all blank.</p>
1267 </dd>
1268 <dt class="hdlist1">-I&lt;regex&gt;</dt>
1269 <dt class="hdlist1">--ignore-matching-lines=&lt;regex&gt;</dt>
1270 <dd>
1271 <p>Ignore changes whose all lines match &lt;regex&gt;. This option may
1272 be specified more than once.</p>
1273 </dd>
1274 <dt class="hdlist1">--inter-hunk-context=&lt;lines&gt;</dt>
1275 <dd>
1276 <p>Show the context between diff hunks, up to the specified number
1277 of lines, thereby fusing hunks that are close to each other.
1278 Defaults to <code>diff.interHunkContext</code> or 0 if the config option
1279 is unset.</p>
1280 </dd>
1281 <dt class="hdlist1">-W</dt>
1282 <dt class="hdlist1">--function-context</dt>
1283 <dd>
1284 <p>Show whole function as context lines for each change.
1285 The function names are determined in the same way as
1286 <code>git</code> <code>diff</code> works out patch hunk headers (see <em>Defining a
1287 custom hunk-header</em> in <a href="gitattributes.html">gitattributes(5)</a>).</p>
1288 </dd>
1289 <dt class="hdlist1">--exit-code</dt>
1290 <dd>
1291 <p>Make the program exit with codes similar to diff(1).
1292 That is, it exits with 1 if there were differences and
1293 0 means no differences.</p>
1294 </dd>
1295 <dt class="hdlist1">--quiet</dt>
1296 <dd>
1297 <p>Disable all output of the program. Implies <code>--exit-code</code>.
1298 Disables execution of external diff helpers whose exit code
1299 is not trusted, i.e. their respective configuration option
1300 <code>diff.trustExitCode</code> or <code>diff.</code><em>&lt;driver&gt;</em><code>.trustExitCode</code> or
1301 environment variable <code>GIT_EXTERNAL_DIFF_TRUST_EXIT_CODE</code> is
1302 false.</p>
1303 </dd>
1304 <dt class="hdlist1">--ext-diff</dt>
1305 <dd>
1306 <p>Allow an external diff helper to be executed. If you set an
1307 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
1308 to use this option with <a href="git-log.html">git-log(1)</a> and friends.</p>
1309 </dd>
1310 <dt class="hdlist1">--no-ext-diff</dt>
1311 <dd>
1312 <p>Disallow external diff drivers.</p>
1313 </dd>
1314 <dt class="hdlist1">--textconv</dt>
1315 <dt class="hdlist1">--no-textconv</dt>
1316 <dd>
1317 <p>Allow (or disallow) external text conversion filters to be run
1318 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
1319 details. Because textconv filters are typically a one-way
1320 conversion, the resulting diff is suitable for human
1321 consumption, but cannot be applied. For this reason, textconv
1322 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
1323 <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or
1324 diff plumbing commands.</p>
1325 </dd>
1326 <dt class="hdlist1">--ignore-submodules[=&lt;when&gt;]</dt>
1327 <dd>
1328 <p>Ignore changes to submodules in the diff generation. &lt;when&gt; can be
1329 either "none", "untracked", "dirty" or "all", which is the default.
1330 Using "none" will consider the submodule modified when it either contains
1331 untracked or modified files or its HEAD differs from the commit recorded
1332 in the superproject and can be used to override any settings of the
1333 <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
1334 "untracked" is used submodules are not considered dirty when they only
1335 contain untracked content (but they are still scanned for modified
1336 content). Using "dirty" ignores all changes to the work tree of submodules,
1337 only changes to the commits stored in the superproject are shown (this was
1338 the behavior until 1.7.0). Using "all" hides all changes to submodules.</p>
1339 </dd>
1340 <dt class="hdlist1">--src-prefix=&lt;prefix&gt;</dt>
1341 <dd>
1342 <p>Show the given source prefix instead of "a/".</p>
1343 </dd>
1344 <dt class="hdlist1">--dst-prefix=&lt;prefix&gt;</dt>
1345 <dd>
1346 <p>Show the given destination prefix instead of "b/".</p>
1347 </dd>
1348 <dt class="hdlist1">--no-prefix</dt>
1349 <dd>
1350 <p>Do not show any source or destination prefix.</p>
1351 </dd>
1352 <dt class="hdlist1">--default-prefix</dt>
1353 <dd>
1354 <p>Use the default source and destination prefixes ("a/" and "b/").
1355 This overrides configuration variables such as <code>diff.noprefix</code>,
1356 <code>diff.srcPrefix</code>, <code>diff.dstPrefix</code>, and <code>diff.mnemonicPrefix</code>
1357 (see <code>git-config</code>(1)).</p>
1358 </dd>
1359 <dt class="hdlist1">--line-prefix=&lt;prefix&gt;</dt>
1360 <dd>
1361 <p>Prepend an additional prefix to every line of output.</p>
1362 </dd>
1363 <dt class="hdlist1">--ita-invisible-in-index</dt>
1364 <dd>
1365 <p>By default entries added by "git add -N" appear as an existing
1366 empty file in "git diff" and a new file in "git diff --cached".
1367 This option makes the entry appear as a new file in "git diff"
1368 and non-existent in "git diff --cached". This option could be
1369 reverted with <code>--ita-visible-in-index</code>. Both options are
1370 experimental and could be removed in future.</p>
1371 </dd>
1372 </dl>
1373 </div>
1374 <div class="paragraph">
1375 <p>For more detailed explanation on these common options, see also
1376 <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p>
1377 </div>
1378 <div class="dlist">
1379 <dl>
1380 <dt class="hdlist1">-1 --base</dt>
1381 <dt class="hdlist1">-2 --ours</dt>
1382 <dt class="hdlist1">-3 --theirs</dt>
1383 <dt class="hdlist1">-0</dt>
1384 <dd>
1385 <p>Diff against the "base" version, "our branch", or "their
1386 branch" respectively. With these options, diffs for
1387 merged entries are not shown.</p>
1388 <div class="paragraph">
1389 <p>The default is to diff against our branch (-2) and the
1390 cleanly resolved paths. The option -0 can be given to
1391 omit diff output for unmerged entries and just show "Unmerged".</p>
1392 </div>
1393 </dd>
1394 <dt class="hdlist1">-c</dt>
1395 <dt class="hdlist1">--cc</dt>
1396 <dd>
1397 <p>This compares stage 2 (our branch), stage 3 (their
1398 branch), and the working tree file and outputs a combined
1399 diff, similar to the way <em>diff-tree</em> shows a merge
1400 commit with these flags.</p>
1401 </dd>
1402 <dt class="hdlist1">-q</dt>
1403 <dd>
1404 <p>Remain silent even for nonexistent files</p>
1405 </dd>
1406 </dl>
1407 </div>
1408 </div>
1409 </div>
1410 <div class="sect1">
1411 <h2 id="_raw_output_format">Raw output format</h2>
1412 <div class="sectionbody">
1413 <div class="paragraph">
1414 <p>The raw output format from "git-diff-index", "git-diff-tree",
1415 "git-diff-files" and "git diff --raw" are very similar.</p>
1416 </div>
1417 <div class="paragraph">
1418 <p>These commands all compare two sets of things; what is
1419 compared differs:</p>
1420 </div>
1421 <div class="dlist">
1422 <dl>
1423 <dt class="hdlist1">git-diff-index &lt;tree-ish&gt;</dt>
1424 <dd>
1425 <p>compares the &lt;tree-ish&gt; and the files on the filesystem.</p>
1426 </dd>
1427 <dt class="hdlist1">git-diff-index --cached &lt;tree-ish&gt;</dt>
1428 <dd>
1429 <p>compares the &lt;tree-ish&gt; and the index.</p>
1430 </dd>
1431 <dt class="hdlist1">git-diff-tree [-r] &lt;tree-ish-1&gt; &lt;tree-ish-2&gt; [&lt;pattern&gt;&#8230;&#8203;]</dt>
1432 <dd>
1433 <p>compares the trees named by the two arguments.</p>
1434 </dd>
1435 <dt class="hdlist1">git-diff-files [&lt;pattern&gt;&#8230;&#8203;]</dt>
1436 <dd>
1437 <p>compares the index and the files on the filesystem.</p>
1438 </dd>
1439 </dl>
1440 </div>
1441 <div class="paragraph">
1442 <p>The "git-diff-tree" command begins its output by printing the hash of
1443 what is being compared. After that, all the commands print one output
1444 line per changed file.</p>
1445 </div>
1446 <div class="paragraph">
1447 <p>An output line is formatted this way:</p>
1448 </div>
1449 <div class="listingblock">
1450 <div class="content">
1451 <pre>in-place edit :100644 100644 bcd1234 0123456 M file0
1452 copy-edit :100644 100644 abcd123 1234567 C68 file1 file2
1453 rename-edit :100644 100644 abcd123 1234567 R86 file1 file3
1454 create :000000 100644 0000000 1234567 A file4
1455 delete :100644 000000 1234567 0000000 D file5
1456 unmerged :000000 000000 0000000 0000000 U file6</pre>
1457 </div>
1458 </div>
1459 <div class="paragraph">
1460 <p>That is, from the left to the right:</p>
1461 </div>
1462 <div class="olist arabic">
1463 <ol class="arabic">
1464 <li>
1465 <p>a colon.</p>
1466 </li>
1467 <li>
1468 <p>mode for "src"; 000000 if creation or unmerged.</p>
1469 </li>
1470 <li>
1471 <p>a space.</p>
1472 </li>
1473 <li>
1474 <p>mode for "dst"; 000000 if deletion or unmerged.</p>
1475 </li>
1476 <li>
1477 <p>a space.</p>
1478 </li>
1479 <li>
1480 <p>sha1 for "src"; 0{40} if creation or unmerged.</p>
1481 </li>
1482 <li>
1483 <p>a space.</p>
1484 </li>
1485 <li>
1486 <p>sha1 for "dst"; 0{40} if deletion, unmerged or "work tree out of sync with the index".</p>
1487 </li>
1488 <li>
1489 <p>a space.</p>
1490 </li>
1491 <li>
1492 <p>status, followed by optional "score" number.</p>
1493 </li>
1494 <li>
1495 <p>a tab or a NUL when <code>-z</code> option is used.</p>
1496 </li>
1497 <li>
1498 <p>path for "src"</p>
1499 </li>
1500 <li>
1501 <p>a tab or a NUL when <code>-z</code> option is used; only exists for C or R.</p>
1502 </li>
1503 <li>
1504 <p>path for "dst"; only exists for C or R.</p>
1505 </li>
1506 <li>
1507 <p>an LF or a NUL when <code>-z</code> option is used, to terminate the record.</p>
1508 </li>
1509 </ol>
1510 </div>
1511 <div class="paragraph">
1512 <p>Possible status letters are:</p>
1513 </div>
1514 <div class="ulist">
1515 <ul>
1516 <li>
1517 <p>A: addition of a file</p>
1518 </li>
1519 <li>
1520 <p>C: copy of a file into a new one</p>
1521 </li>
1522 <li>
1523 <p>D: deletion of a file</p>
1524 </li>
1525 <li>
1526 <p>M: modification of the contents or mode of a file</p>
1527 </li>
1528 <li>
1529 <p>R: renaming of a file</p>
1530 </li>
1531 <li>
1532 <p>T: change in the type of the file (regular file, symbolic link or submodule)</p>
1533 </li>
1534 <li>
1535 <p>U: file is unmerged (you must complete the merge before it can
1536 be committed)</p>
1537 </li>
1538 <li>
1539 <p>X: "unknown" change type (most probably a bug, please report it)</p>
1540 </li>
1541 </ul>
1542 </div>
1543 <div class="paragraph">
1544 <p>Status letters C and R are always followed by a score (denoting the
1545 percentage of similarity between the source and target of the move or
1546 copy). Status letter M may be followed by a score (denoting the
1547 percentage of dissimilarity) for file rewrites.</p>
1548 </div>
1549 <div class="paragraph">
1550 <p>The sha1 for "dst" is shown as all 0&#8217;s if a file on the filesystem
1551 is out of sync with the index.</p>
1552 </div>
1553 <div class="paragraph">
1554 <p>Example:</p>
1555 </div>
1556 <div class="listingblock">
1557 <div class="content">
1558 <pre>:100644 100644 5be4a4a 0000000 M file.c</pre>
1559 </div>
1560 </div>
1561 <div class="paragraph">
1562 <p>Without the <code>-z</code> option, pathnames with "unusual" characters are
1563 quoted as explained for the configuration variable <code>core.quotePath</code>
1564 (see <a href="git-config.html">git-config(1)</a>). Using <code>-z</code> the filename is output
1565 verbatim and the line is terminated by a NUL byte.</p>
1566 </div>
1567 </div>
1568 </div>
1569 <div class="sect1">
1570 <h2 id="_diff_format_for_merges">diff format for merges</h2>
1571 <div class="sectionbody">
1572 <div class="paragraph">
1573 <p>"git-diff-tree", "git-diff-files" and "git-diff --raw"
1574 can take <code>-c</code> or <code>--cc</code> option
1575 to generate diff output also for merge commits. The output differs
1576 from the format described above in the following way:</p>
1577 </div>
1578 <div class="olist arabic">
1579 <ol class="arabic">
1580 <li>
1581 <p>there is a colon for each parent</p>
1582 </li>
1583 <li>
1584 <p>there are more "src" modes and "src" sha1</p>
1585 </li>
1586 <li>
1587 <p>status is concatenated status characters for each parent</p>
1588 </li>
1589 <li>
1590 <p>no optional "score" number</p>
1591 </li>
1592 <li>
1593 <p>tab-separated pathname(s) of the file</p>
1594 </li>
1595 </ol>
1596 </div>
1597 <div class="paragraph">
1598 <p>For <code>-c</code> and <code>--cc</code>, only the destination or final path is shown even
1599 if the file was renamed on any side of history. With
1600 <code>--combined-all-paths</code>, the name of the path in each parent is shown
1601 followed by the name of the path in the merge commit.</p>
1602 </div>
1603 <div class="paragraph">
1604 <p>Examples for <code>-c</code> and <code>--cc</code> without <code>--combined-all-paths</code>:</p>
1605 </div>
1606 <div class="listingblock">
1607 <div class="content">
1608 <pre>::100644 100644 100644 fabadb8 cc95eb0 4866510 MM desc.c
1609 ::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM bar.sh
1610 ::100644 100644 100644 e07d6c5 9042e82 ee91881 RR phooey.c</pre>
1611 </div>
1612 </div>
1613 <div class="paragraph">
1614 <p>Examples when <code>--combined-all-paths</code> added to either <code>-c</code> or <code>--cc</code>:</p>
1615 </div>
1616 <div class="listingblock">
1617 <div class="content">
1618 <pre>::100644 100644 100644 fabadb8 cc95eb0 4866510 MM desc.c desc.c desc.c
1619 ::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM foo.sh bar.sh bar.sh
1620 ::100644 100644 100644 e07d6c5 9042e82 ee91881 RR fooey.c fuey.c phooey.c</pre>
1621 </div>
1622 </div>
1623 <div class="paragraph">
1624 <p>Note that <em>combined diff</em> lists only files which were modified from
1625 all parents.</p>
1626 </div>
1627 </div>
1628 </div>
1629 <div class="sect1">
1630 <h2 id="generate_patch_text_with_p">Generating patch text with -p</h2>
1631 <div class="sectionbody">
1632 <div class="paragraph">
1633 <p>Running
1634 <a href="git-diff.html">git-diff(1)</a>,
1635 <a href="git-log.html">git-log(1)</a>,
1636 <a href="git-show.html">git-show(1)</a>,
1637 <a href="git-diff-index.html">git-diff-index(1)</a>,
1638 <a href="git-diff-tree.html">git-diff-tree(1)</a>, or
1639 <a href="git-diff-files.html">git-diff-files(1)</a>
1640 with the <code>-p</code> option produces patch text.
1641 You can customize the creation of patch text via the
1642 <code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables
1643 (see <a href="git.html">git(1)</a>), and the <code>diff</code> attribute (see <a href="gitattributes.html">gitattributes(5)</a>).</p>
1644 </div>
1645 <div class="paragraph">
1646 <p>What the -p option produces is slightly different from the traditional
1647 diff format:</p>
1648 </div>
1649 <div class="olist arabic">
1650 <ol class="arabic">
1651 <li>
1652 <p>It is preceded by a "git diff" header that looks like this:</p>
1653 <div class="literalblock">
1654 <div class="content">
1655 <pre>diff --git a/file1 b/file2</pre>
1656 </div>
1657 </div>
1658 <div class="paragraph">
1659 <p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is
1660 involved. Especially, even for a creation or a deletion,
1661 <code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p>
1662 </div>
1663 <div class="paragraph">
1664 <p>When a rename/copy is involved, <code>file1</code> and <code>file2</code> show the
1665 name of the source file of the rename/copy and the name of
1666 the file that the rename/copy produces, respectively.</p>
1667 </div>
1668 </li>
1669 <li>
1670 <p>It is followed by one or more extended header lines:</p>
1671 <div class="literalblock">
1672 <div class="content">
1673 <pre>old mode &lt;mode&gt;
1674 new mode &lt;mode&gt;
1675 deleted file mode &lt;mode&gt;
1676 new file mode &lt;mode&gt;
1677 copy from &lt;path&gt;
1678 copy to &lt;path&gt;
1679 rename from &lt;path&gt;
1680 rename to &lt;path&gt;
1681 similarity index &lt;number&gt;
1682 dissimilarity index &lt;number&gt;
1683 index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</pre>
1684 </div>
1685 </div>
1686 <div class="paragraph">
1687 <p>File modes are printed as 6-digit octal numbers including the file type
1688 and file permission bits.</p>
1689 </div>
1690 <div class="paragraph">
1691 <p>Path names in extended headers do not include the <code>a/</code> and <code>b/</code> prefixes.</p>
1692 </div>
1693 <div class="paragraph">
1694 <p>The similarity index is the percentage of unchanged lines, and
1695 the dissimilarity index is the percentage of changed lines. It
1696 is a rounded down integer, followed by a percent sign. The
1697 similarity index value of 100% is thus reserved for two equal
1698 files, while 100% dissimilarity means that no line from the old
1699 file made it into the new one.</p>
1700 </div>
1701 <div class="paragraph">
1702 <p>The index line includes the blob object names before and after the change.
1703 The &lt;mode&gt; is included if the file mode does not change; otherwise,
1704 separate lines indicate the old and the new mode.</p>
1705 </div>
1706 </li>
1707 <li>
1708 <p>Pathnames with "unusual" characters are quoted as explained for
1709 the configuration variable <code>core.quotePath</code> (see
1710 <a href="git-config.html">git-config(1)</a>).</p>
1711 </li>
1712 <li>
1713 <p>All the <code>file1</code> files in the output refer to files before the
1714 commit, and all the <code>file2</code> files refer to files after the commit.
1715 It is incorrect to apply each change to each file sequentially. For
1716 example, this patch will swap a and b:</p>
1717 <div class="literalblock">
1718 <div class="content">
1719 <pre>diff --git a/a b/b
1720 rename from a
1721 rename to b
1722 diff --git a/b b/a
1723 rename from b
1724 rename to a</pre>
1725 </div>
1726 </div>
1727 </li>
1728 <li>
1729 <p>Hunk headers mention the name of the function to which the hunk
1730 applies. See "Defining a custom hunk-header" in
1731 <a href="gitattributes.html">gitattributes(5)</a> for details of how to tailor this to
1732 specific languages.</p>
1733 </li>
1734 </ol>
1735 </div>
1736 </div>
1737 </div>
1738 <div class="sect1">
1739 <h2 id="_combined_diff_format">Combined diff format</h2>
1740 <div class="sectionbody">
1741 <div class="paragraph">
1742 <p>Any diff-generating command can take the <code>-c</code> or <code>--cc</code> option to
1743 produce a <em>combined diff</em> when showing a merge. This is the default
1744 format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
1745 <a href="git-show.html">git-show(1)</a>. Note also that you can give suitable
1746 <code>--diff-merges</code> option to any of these commands to force generation of
1747 diffs in a specific format.</p>
1748 </div>
1749 <div class="paragraph">
1750 <p>A "combined diff" format looks like this:</p>
1751 </div>
1752 <div class="listingblock">
1753 <div class="content">
1754 <pre>diff --combined describe.c
1755 index fabadb8,cc95eb0..4866510
1756 --- a/describe.c
1757 +++ b/describe.c
1758 @@@ -98,20 -98,12 +98,20 @@@
1759 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
1762 - static void describe(char *arg)
1763 -static void describe(struct commit *cmit, int last_one)
1764 ++static void describe(char *arg, int last_one)
1766 + unsigned char sha1[20];
1767 + struct commit *cmit;
1768 struct commit_list *list;
1769 static int initialized = 0;
1770 struct commit_name *n;
1772 + if (get_sha1(arg, sha1) &lt; 0)
1773 + usage(describe_usage);
1774 + cmit = lookup_commit_reference(sha1);
1775 + if (!cmit)
1776 + usage(describe_usage);
1778 if (!initialized) {
1779 initialized = 1;
1780 for_each_ref(get_name);</pre>
1781 </div>
1782 </div>
1783 <div class="olist arabic">
1784 <ol class="arabic">
1785 <li>
1786 <p>It is preceded by a "git diff" header, that looks like
1787 this (when the <code>-c</code> option is used):</p>
1788 <div class="literalblock">
1789 <div class="content">
1790 <pre>diff --combined file</pre>
1791 </div>
1792 </div>
1793 <div class="paragraph">
1794 <p>or like this (when the <code>--cc</code> option is used):</p>
1795 </div>
1796 <div class="literalblock">
1797 <div class="content">
1798 <pre>diff --cc file</pre>
1799 </div>
1800 </div>
1801 </li>
1802 <li>
1803 <p>It is followed by one or more extended header lines
1804 (this example shows a merge with two parents):</p>
1805 <div class="literalblock">
1806 <div class="content">
1807 <pre>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
1808 mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
1809 new file mode &lt;mode&gt;
1810 deleted file mode &lt;mode&gt;,&lt;mode&gt;</pre>
1811 </div>
1812 </div>
1813 <div class="paragraph">
1814 <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
1815 the &lt;mode&gt; is different from the rest. Extended headers with
1816 information about detected content movement (renames and
1817 copying detection) are designed to work with the diff of two
1818 &lt;tree-ish&gt; and are not used by combined diff format.</p>
1819 </div>
1820 </li>
1821 <li>
1822 <p>It is followed by a two-line from-file/to-file header:</p>
1823 <div class="literalblock">
1824 <div class="content">
1825 <pre>--- a/file
1826 +++ b/file</pre>
1827 </div>
1828 </div>
1829 <div class="paragraph">
1830 <p>Similar to the two-line header for the traditional <em>unified</em> diff
1831 format, <code>/dev/null</code> is used to signal created or deleted
1832 files.</p>
1833 </div>
1834 <div class="paragraph">
1835 <p>However, if the --combined-all-paths option is provided, instead of a
1836 two-line from-file/to-file, you get an N+1 line from-file/to-file header,
1837 where N is the number of parents in the merge commit:</p>
1838 </div>
1839 <div class="literalblock">
1840 <div class="content">
1841 <pre>--- a/file
1842 --- a/file
1843 --- a/file
1844 +++ b/file</pre>
1845 </div>
1846 </div>
1847 <div class="paragraph">
1848 <p>This extended format can be useful if rename or copy detection is
1849 active, to allow you to see the original name of the file in different
1850 parents.</p>
1851 </div>
1852 </li>
1853 <li>
1854 <p>Chunk header format is modified to prevent people from
1855 accidentally feeding it to <code>patch</code> <code>-p1</code>. Combined diff format
1856 was created for review of merge commit changes, and was not
1857 meant to be applied. The change is similar to the change in the
1858 extended <em>index</em> header:</p>
1859 <div class="literalblock">
1860 <div class="content">
1861 <pre>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</pre>
1862 </div>
1863 </div>
1864 <div class="paragraph">
1865 <p>There are (number of parents + 1) <code>@</code> characters in the chunk
1866 header for combined diff format.</p>
1867 </div>
1868 </li>
1869 </ol>
1870 </div>
1871 <div class="paragraph">
1872 <p>Unlike the traditional <em>unified</em> diff format, which shows two
1873 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
1874 added to B), or " " (space&#8201;&#8212;&#8201;unchanged) prefix, this format
1875 compares two or more files file1, file2,&#8230;&#8203; with one file X, and
1876 shows how X differs from each of fileN. One column for each of
1877 fileN is prepended to the output line to note how X&#8217;s line is
1878 different from it.</p>
1879 </div>
1880 <div class="paragraph">
1881 <p>A <code>-</code> character in the column N means that the line appears in
1882 fileN but it does not appear in the result. A <code>+</code> character
1883 in the column N means that the line appears in the result,
1884 and fileN does not have that line (in other words, the line was
1885 added, from the point of view of that parent).</p>
1886 </div>
1887 <div class="paragraph">
1888 <p>In the above example output, the function signature was changed
1889 from both files (hence two <code>-</code> removals from both file1 and
1890 file2, plus <code>++</code> to mean one line that was added does not appear
1891 in either file1 or file2). Also, eight other lines are the same
1892 from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p>
1893 </div>
1894 <div class="paragraph">
1895 <p>When shown by <code>git</code> <code>diff-tree</code> <code>-c</code>, it compares the parents of a
1896 merge commit with the merge result (i.e. file1..fileN are the
1897 parents). When shown by <code>git</code> <code>diff-files</code> <code>-c</code>, it compares the
1898 two unresolved merge parents with the working tree file
1899 (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
1900 "their version").</p>
1901 </div>
1902 </div>
1903 </div>
1904 <div class="sect1">
1905 <h2 id="_other_diff_formats">other diff formats</h2>
1906 <div class="sectionbody">
1907 <div class="paragraph">
1908 <p>The <code>--summary</code> option describes newly added, deleted, renamed and
1909 copied files. The <code>--stat</code> option adds diffstat(1) graph to the
1910 output. These options can be combined with other options, such as
1911 <code>-p</code>, and are meant for human consumption.</p>
1912 </div>
1913 <div class="paragraph">
1914 <p>When showing a change that involves a rename or a copy, <code>--stat</code> output
1915 formats the pathnames compactly by combining common prefix and suffix of
1916 the pathnames. For example, a change that moves <code>arch/i386/Makefile</code> to
1917 <code>arch/x86/Makefile</code> while modifying 4 lines will be shown like this:</p>
1918 </div>
1919 <div class="listingblock">
1920 <div class="content">
1921 <pre>arch/{i386 =&gt; x86}/Makefile | 4 +--</pre>
1922 </div>
1923 </div>
1924 <div class="paragraph">
1925 <p>The <code>--numstat</code> option gives the diffstat(1) information but is designed
1926 for easier machine consumption. An entry in <code>--numstat</code> output looks
1927 like this:</p>
1928 </div>
1929 <div class="listingblock">
1930 <div class="content">
1931 <pre>1 2 README
1932 3 1 arch/{i386 =&gt; x86}/Makefile</pre>
1933 </div>
1934 </div>
1935 <div class="paragraph">
1936 <p>That is, from left to right:</p>
1937 </div>
1938 <div class="olist arabic">
1939 <ol class="arabic">
1940 <li>
1941 <p>the number of added lines;</p>
1942 </li>
1943 <li>
1944 <p>a tab;</p>
1945 </li>
1946 <li>
1947 <p>the number of deleted lines;</p>
1948 </li>
1949 <li>
1950 <p>a tab;</p>
1951 </li>
1952 <li>
1953 <p>pathname (possibly with rename/copy information);</p>
1954 </li>
1955 <li>
1956 <p>a newline.</p>
1957 </li>
1958 </ol>
1959 </div>
1960 <div class="paragraph">
1961 <p>When <code>-z</code> output option is in effect, the output is formatted this way:</p>
1962 </div>
1963 <div class="listingblock">
1964 <div class="content">
1965 <pre>1 2 README NUL
1966 3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL</pre>
1967 </div>
1968 </div>
1969 <div class="paragraph">
1970 <p>That is:</p>
1971 </div>
1972 <div class="olist arabic">
1973 <ol class="arabic">
1974 <li>
1975 <p>the number of added lines;</p>
1976 </li>
1977 <li>
1978 <p>a tab;</p>
1979 </li>
1980 <li>
1981 <p>the number of deleted lines;</p>
1982 </li>
1983 <li>
1984 <p>a tab;</p>
1985 </li>
1986 <li>
1987 <p>a NUL (only exists if renamed/copied);</p>
1988 </li>
1989 <li>
1990 <p>pathname in preimage;</p>
1991 </li>
1992 <li>
1993 <p>a NUL (only exists if renamed/copied);</p>
1994 </li>
1995 <li>
1996 <p>pathname in postimage (only exists if renamed/copied);</p>
1997 </li>
1998 <li>
1999 <p>a NUL.</p>
2000 </li>
2001 </ol>
2002 </div>
2003 <div class="paragraph">
2004 <p>The extra <code>NUL</code> before the preimage path in renamed case is to allow
2005 scripts that read the output to tell if the current record being read is
2006 a single-path record or a rename/copy record without reading ahead.
2007 After reading added and deleted lines, reading up to <code>NUL</code> would yield
2008 the pathname, but if that is <code>NUL</code>, the record will show two paths.</p>
2009 </div>
2010 </div>
2011 </div>
2012 <div class="sect1">
2013 <h2 id="_git">GIT</h2>
2014 <div class="sectionbody">
2015 <div class="paragraph">
2016 <p>Part of the <a href="git.html">git(1)</a> suite</p>
2017 </div>
2018 </div>
2019 </div>
2020 </div>
2021 <div id="footer">
2022 <div id="footer-text">
2023 Last updated 2023-10-23 14:43:46 -0700
2024 </div>
2025 </div>
2026 </body>
2027 </html>