Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.6.9" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 7 | <title>git-diff-files(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 37 | |
| 38 | em { |
| 39 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 40 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 45 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 46 | } |
| 47 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 55 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | padding-top: 0.5em; |
| 60 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 89 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 97 | pre { |
| 98 | white-space: pre-wrap; |
| 99 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 100 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 101 | #author { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 102 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 103 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 104 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 105 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 106 | #email { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 107 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 108 | #revnumber, #revdate, #revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 109 | } |
| 110 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 111 | #footer { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 112 | font-size: small; |
| 113 | border-top: 2px solid silver; |
| 114 | padding-top: 0.5em; |
| 115 | margin-top: 4.0em; |
| 116 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 117 | #footer-text { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 118 | float: left; |
| 119 | padding-bottom: 0.5em; |
| 120 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 121 | #footer-badges { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 122 | float: right; |
| 123 | padding-bottom: 0.5em; |
| 124 | } |
| 125 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 126 | #preamble { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 127 | margin-top: 1.5em; |
| 128 | margin-bottom: 1.5em; |
| 129 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 130 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 131 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 132 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 133 | margin-top: 1.0em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 134 | margin-bottom: 1.5em; |
| 135 | } |
| 136 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 137 | margin-top: 2.0em; |
| 138 | margin-bottom: 2.0em; |
| 139 | margin-right: 10%; |
| 140 | color: #606060; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | div.content { /* Block element content. */ |
| 144 | padding: 0; |
| 145 | } |
| 146 | |
| 147 | /* Block element titles. */ |
| 148 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 149 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 150 | font-weight: bold; |
| 151 | text-align: left; |
| 152 | margin-top: 1.0em; |
| 153 | margin-bottom: 0.5em; |
| 154 | } |
| 155 | div.title + * { |
| 156 | margin-top: 0; |
| 157 | } |
| 158 | |
| 159 | td div.title:first-child { |
| 160 | margin-top: 0.0em; |
| 161 | } |
| 162 | div.content div.title:first-child { |
| 163 | margin-top: 0.0em; |
| 164 | } |
| 165 | div.content + div.title { |
| 166 | margin-top: 0.0em; |
| 167 | } |
| 168 | |
| 169 | div.sidebarblock > div.content { |
| 170 | background: #ffffee; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 171 | border: 1px solid #dddddd; |
| 172 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 173 | padding: 0.5em; |
| 174 | } |
| 175 | |
| 176 | div.listingblock > div.content { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 177 | border: 1px solid #dddddd; |
| 178 | border-left: 5px solid #f0f0f0; |
| 179 | background: #f8f8f8; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 180 | padding: 0.5em; |
| 181 | } |
| 182 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 183 | div.quoteblock, div.verseblock { |
| 184 | padding-left: 1.0em; |
| 185 | margin-left: 1.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 186 | margin-right: 10%; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 187 | border-left: 5px solid #f0f0f0; |
| 188 | color: #888; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 189 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 190 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 191 | div.quoteblock > div.attribution { |
| 192 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 193 | text-align: right; |
| 194 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 195 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 196 | div.verseblock > pre.content { |
| 197 | font-family: inherit; |
| 198 | font-size: inherit; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 199 | } |
| 200 | div.verseblock > div.attribution { |
| 201 | padding-top: 0.75em; |
| 202 | text-align: left; |
| 203 | } |
| 204 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 205 | div.verseblock + div.attribution { |
| 206 | text-align: left; |
| 207 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 208 | |
| 209 | div.admonitionblock .icon { |
| 210 | vertical-align: top; |
| 211 | font-size: 1.1em; |
| 212 | font-weight: bold; |
| 213 | text-decoration: underline; |
| 214 | color: #527bbd; |
| 215 | padding-right: 0.5em; |
| 216 | } |
| 217 | div.admonitionblock td.content { |
| 218 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 219 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 223 | border-left: 3px solid #dddddd; |
| 224 | padding-left: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 225 | } |
| 226 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 227 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 228 | span.image img { border-style: none; vertical-align: text-bottom; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 229 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 230 | |
| 231 | dl { |
| 232 | margin-top: 0.8em; |
| 233 | margin-bottom: 0.8em; |
| 234 | } |
| 235 | dt { |
| 236 | margin-top: 0.5em; |
| 237 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 238 | font-style: normal; |
| 239 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 240 | } |
| 241 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 242 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | ul, ol { |
| 246 | list-style-position: outside; |
| 247 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 248 | ol.arabic { |
| 249 | list-style-type: decimal; |
| 250 | } |
| 251 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 252 | list-style-type: lower-alpha; |
| 253 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 254 | ol.upperalpha { |
| 255 | list-style-type: upper-alpha; |
| 256 | } |
| 257 | ol.lowerroman { |
| 258 | list-style-type: lower-roman; |
| 259 | } |
| 260 | ol.upperroman { |
| 261 | list-style-type: upper-roman; |
| 262 | } |
| 263 | |
| 264 | div.compact ul, div.compact ol, |
| 265 | div.compact p, div.compact p, |
| 266 | div.compact div, div.compact div { |
| 267 | margin-top: 0.1em; |
| 268 | margin-bottom: 0.1em; |
| 269 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 270 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 271 | tfoot { |
| 272 | font-weight: bold; |
| 273 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 274 | td > div.verse { |
| 275 | white-space: pre; |
| 276 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 277 | |
| 278 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 279 | margin-top: 0.8em; |
| 280 | margin-bottom: 0.8em; |
| 281 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 282 | div.hdlist tr { |
| 283 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 284 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 285 | dt.hdlist1.strong, td.hdlist1.strong { |
| 286 | font-weight: bold; |
| 287 | } |
| 288 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 289 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 290 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 291 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 292 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 293 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 294 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 295 | vertical-align: top; |
| 296 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 297 | div.hdlist.compact tr { |
| 298 | margin: 0; |
| 299 | padding-bottom: 0; |
| 300 | } |
| 301 | |
| 302 | .comment { |
| 303 | background: yellow; |
| 304 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 305 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 306 | .footnote, .footnoteref { |
| 307 | font-size: 0.8em; |
| 308 | } |
| 309 | |
| 310 | span.footnote, span.footnoteref { |
| 311 | vertical-align: super; |
| 312 | } |
| 313 | |
| 314 | #footnotes { |
| 315 | margin: 20px 0 20px 0; |
| 316 | padding: 7px 0 0 0; |
| 317 | } |
| 318 | |
| 319 | #footnotes div.footnote { |
| 320 | margin: 0 0 5px 0; |
| 321 | } |
| 322 | |
| 323 | #footnotes hr { |
| 324 | border: none; |
| 325 | border-top: 1px solid silver; |
| 326 | height: 1px; |
| 327 | text-align: left; |
| 328 | margin-left: 0; |
| 329 | width: 20%; |
| 330 | min-width: 100px; |
| 331 | } |
| 332 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 333 | div.colist td { |
| 334 | padding-right: 0.5em; |
| 335 | padding-bottom: 0.3em; |
| 336 | vertical-align: top; |
| 337 | } |
| 338 | div.colist td img { |
| 339 | margin-top: 0.3em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 340 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 341 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 342 | @media print { |
| 343 | #footer-badges { display: none; } |
| 344 | } |
| 345 | |
| 346 | #toc { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 347 | margin-bottom: 2.5em; |
| 348 | } |
| 349 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 350 | #toctitle { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 351 | color: #527bbd; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 352 | font-size: 1.1em; |
| 353 | font-weight: bold; |
| 354 | margin-top: 1.0em; |
| 355 | margin-bottom: 0.1em; |
| 356 | } |
| 357 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 358 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 359 | margin-top: 0; |
| 360 | margin-bottom: 0; |
| 361 | } |
| 362 | div.toclevel2 { |
| 363 | margin-left: 2em; |
| 364 | font-size: 0.9em; |
| 365 | } |
| 366 | div.toclevel3 { |
| 367 | margin-left: 4em; |
| 368 | font-size: 0.9em; |
| 369 | } |
| 370 | div.toclevel4 { |
| 371 | margin-left: 6em; |
| 372 | font-size: 0.9em; |
| 373 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 374 | |
| 375 | span.aqua { color: aqua; } |
| 376 | span.black { color: black; } |
| 377 | span.blue { color: blue; } |
| 378 | span.fuchsia { color: fuchsia; } |
| 379 | span.gray { color: gray; } |
| 380 | span.green { color: green; } |
| 381 | span.lime { color: lime; } |
| 382 | span.maroon { color: maroon; } |
| 383 | span.navy { color: navy; } |
| 384 | span.olive { color: olive; } |
| 385 | span.purple { color: purple; } |
| 386 | span.red { color: red; } |
| 387 | span.silver { color: silver; } |
| 388 | span.teal { color: teal; } |
| 389 | span.white { color: white; } |
| 390 | span.yellow { color: yellow; } |
| 391 | |
| 392 | span.aqua-background { background: aqua; } |
| 393 | span.black-background { background: black; } |
| 394 | span.blue-background { background: blue; } |
| 395 | span.fuchsia-background { background: fuchsia; } |
| 396 | span.gray-background { background: gray; } |
| 397 | span.green-background { background: green; } |
| 398 | span.lime-background { background: lime; } |
| 399 | span.maroon-background { background: maroon; } |
| 400 | span.navy-background { background: navy; } |
| 401 | span.olive-background { background: olive; } |
| 402 | span.purple-background { background: purple; } |
| 403 | span.red-background { background: red; } |
| 404 | span.silver-background { background: silver; } |
| 405 | span.teal-background { background: teal; } |
| 406 | span.white-background { background: white; } |
| 407 | span.yellow-background { background: yellow; } |
| 408 | |
| 409 | span.big { font-size: 2em; } |
| 410 | span.small { font-size: 0.6em; } |
| 411 | |
| 412 | span.underline { text-decoration: underline; } |
| 413 | span.overline { text-decoration: overline; } |
| 414 | span.line-through { text-decoration: line-through; } |
| 415 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 416 | div.unbreakable { page-break-inside: avoid; } |
| 417 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 418 | |
| 419 | /* |
| 420 | * xhtml11 specific |
| 421 | * |
| 422 | * */ |
| 423 | |
| 424 | div.tableblock { |
| 425 | margin-top: 1.0em; |
| 426 | margin-bottom: 1.5em; |
| 427 | } |
| 428 | div.tableblock > table { |
| 429 | border: 3px solid #527bbd; |
| 430 | } |
| 431 | thead, p.table.header { |
| 432 | font-weight: bold; |
| 433 | color: #527bbd; |
| 434 | } |
| 435 | p.table { |
| 436 | margin-top: 0; |
| 437 | } |
| 438 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 439 | div.tableblock > table[frame="void"] { |
| 440 | border-style: none; |
| 441 | } |
| 442 | div.tableblock > table[frame="hsides"] { |
| 443 | border-left-style: none; |
| 444 | border-right-style: none; |
| 445 | } |
| 446 | div.tableblock > table[frame="vsides"] { |
| 447 | border-top-style: none; |
| 448 | border-bottom-style: none; |
| 449 | } |
| 450 | |
| 451 | |
| 452 | /* |
| 453 | * html5 specific |
| 454 | * |
| 455 | * */ |
| 456 | |
| 457 | table.tableblock { |
| 458 | margin-top: 1.0em; |
| 459 | margin-bottom: 1.5em; |
| 460 | } |
| 461 | thead, p.tableblock.header { |
| 462 | font-weight: bold; |
| 463 | color: #527bbd; |
| 464 | } |
| 465 | p.tableblock { |
| 466 | margin-top: 0; |
| 467 | } |
| 468 | table.tableblock { |
| 469 | border-width: 3px; |
| 470 | border-spacing: 0px; |
| 471 | border-style: solid; |
| 472 | border-color: #527bbd; |
| 473 | border-collapse: collapse; |
| 474 | } |
| 475 | th.tableblock, td.tableblock { |
| 476 | border-width: 1px; |
| 477 | padding: 4px; |
| 478 | border-style: solid; |
| 479 | border-color: #527bbd; |
| 480 | } |
| 481 | |
| 482 | table.tableblock.frame-topbot { |
| 483 | border-left-style: hidden; |
| 484 | border-right-style: hidden; |
| 485 | } |
| 486 | table.tableblock.frame-sides { |
| 487 | border-top-style: hidden; |
| 488 | border-bottom-style: hidden; |
| 489 | } |
| 490 | table.tableblock.frame-none { |
| 491 | border-style: hidden; |
| 492 | } |
| 493 | |
| 494 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 495 | text-align: left; |
| 496 | } |
| 497 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 498 | text-align: center; |
| 499 | } |
| 500 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 501 | text-align: right; |
| 502 | } |
| 503 | |
| 504 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 505 | vertical-align: top; |
| 506 | } |
| 507 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 508 | vertical-align: middle; |
| 509 | } |
| 510 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 511 | vertical-align: bottom; |
| 512 | } |
| 513 | |
| 514 | |
| 515 | /* |
| 516 | * manpage specific |
| 517 | * |
| 518 | * */ |
| 519 | |
| 520 | body.manpage h1 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 521 | padding-top: 0.5em; |
| 522 | padding-bottom: 0.5em; |
| 523 | border-top: 2px solid silver; |
| 524 | border-bottom: 2px solid silver; |
| 525 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 526 | body.manpage h2 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 527 | border-style: none; |
| 528 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 529 | body.manpage div.sectionbody { |
| 530 | margin-left: 3em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 531 | } |
| 532 | |
| 533 | @media print { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 534 | body.manpage div#toc { display: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 535 | } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 536 | |
| 537 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 538 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 539 | <script type="text/javascript"> |
| 540 | /*<![CDATA[*/ |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 541 | var asciidoc = { // Namespace. |
| 542 | |
| 543 | ///////////////////////////////////////////////////////////////////// |
| 544 | // Table Of Contents generator |
| 545 | ///////////////////////////////////////////////////////////////////// |
| 546 | |
| 547 | /* Author: Mihai Bazon, September 2002 |
| 548 | * http://students.infoiasi.ro/~mishoo |
| 549 | * |
| 550 | * Table Of Content generator |
| 551 | * Version: 0.4 |
| 552 | * |
| 553 | * Feel free to use this script under the terms of the GNU General Public |
| 554 | * License, as long as you do not remove or alter this notice. |
| 555 | */ |
| 556 | |
| 557 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 558 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 559 | |
| 560 | // toclevels = 1..4. |
| 561 | toc: function (toclevels) { |
| 562 | |
| 563 | function getText(el) { |
| 564 | var text = ""; |
| 565 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 566 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 567 | text += i.data; |
| 568 | else if (i.firstChild != null) |
| 569 | text += getText(i); |
| 570 | } |
| 571 | return text; |
| 572 | } |
| 573 | |
| 574 | function TocEntry(el, text, toclevel) { |
| 575 | this.element = el; |
| 576 | this.text = text; |
| 577 | this.toclevel = toclevel; |
| 578 | } |
| 579 | |
| 580 | function tocEntries(el, toclevels) { |
| 581 | var result = new Array; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 582 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 583 | // Function that scans the DOM tree for header elements (the DOM2 |
| 584 | // nodeIterator API would be a better technique but not supported by all |
| 585 | // browsers). |
| 586 | var iterate = function (el) { |
| 587 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 588 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 589 | var mo = re.exec(i.tagName); |
| 590 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 591 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 592 | } |
| 593 | iterate(i); |
| 594 | } |
| 595 | } |
| 596 | } |
| 597 | iterate(el); |
| 598 | return result; |
| 599 | } |
| 600 | |
| 601 | var toc = document.getElementById("toc"); |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 602 | if (!toc) { |
| 603 | return; |
| 604 | } |
| 605 | |
| 606 | // Delete existing TOC entries in case we're reloading the TOC. |
| 607 | var tocEntriesToRemove = []; |
| 608 | var i; |
| 609 | for (i = 0; i < toc.childNodes.length; i++) { |
| 610 | var entry = toc.childNodes[i]; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 611 | if (entry.nodeName.toLowerCase() == 'div' |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 612 | && entry.getAttribute("class") |
| 613 | && entry.getAttribute("class").match(/^toclevel/)) |
| 614 | tocEntriesToRemove.push(entry); |
| 615 | } |
| 616 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 617 | toc.removeChild(tocEntriesToRemove[i]); |
| 618 | } |
| 619 | |
| 620 | // Rebuild TOC entries. |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 621 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 622 | for (var i = 0; i < entries.length; ++i) { |
| 623 | var entry = entries[i]; |
| 624 | if (entry.element.id == "") |
| 625 | entry.element.id = "_toc_" + i; |
| 626 | var a = document.createElement("a"); |
| 627 | a.href = "#" + entry.element.id; |
| 628 | a.appendChild(document.createTextNode(entry.text)); |
| 629 | var div = document.createElement("div"); |
| 630 | div.appendChild(a); |
| 631 | div.className = "toclevel" + entry.toclevel; |
| 632 | toc.appendChild(div); |
| 633 | } |
| 634 | if (entries.length == 0) |
| 635 | toc.parentNode.removeChild(toc); |
| 636 | }, |
| 637 | |
| 638 | |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | // Footnotes generator |
| 641 | ///////////////////////////////////////////////////////////////////// |
| 642 | |
| 643 | /* Based on footnote generation code from: |
| 644 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 645 | */ |
| 646 | |
| 647 | footnotes: function () { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 648 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 649 | var i; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 650 | var noteholder = document.getElementById("footnotes"); |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 651 | if (!noteholder) { |
| 652 | return; |
| 653 | } |
| 654 | var entriesToRemove = []; |
| 655 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 656 | var entry = noteholder.childNodes[i]; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 657 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 658 | entriesToRemove.push(entry); |
| 659 | } |
| 660 | for (i = 0; i < entriesToRemove.length; i++) { |
| 661 | noteholder.removeChild(entriesToRemove[i]); |
| 662 | } |
| 663 | |
| 664 | // Rebuild footnote entries. |
| 665 | var cont = document.getElementById("content"); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 666 | var spans = cont.getElementsByTagName("span"); |
| 667 | var refs = {}; |
| 668 | var n = 0; |
| 669 | for (i=0; i<spans.length; i++) { |
| 670 | if (spans[i].className == "footnote") { |
| 671 | n++; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 672 | var note = spans[i].getAttribute("data-note"); |
| 673 | if (!note) { |
| 674 | // Use [\s\S] in place of . so multi-line matches work. |
| 675 | // Because JavaScript has no s (dotall) regex flag. |
| 676 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 677 | spans[i].innerHTML = |
| 678 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 679 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 680 | spans[i].setAttribute("data-note", note); |
| 681 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 682 | noteholder.innerHTML += |
| 683 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 684 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 685 | n + "</a>. " + note + "</div>"; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 686 | var id =spans[i].getAttribute("id"); |
| 687 | if (id != null) refs["#"+id] = n; |
| 688 | } |
| 689 | } |
| 690 | if (n == 0) |
| 691 | noteholder.parentNode.removeChild(noteholder); |
| 692 | else { |
| 693 | // Process footnoterefs. |
| 694 | for (i=0; i<spans.length; i++) { |
| 695 | if (spans[i].className == "footnoteref") { |
| 696 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 697 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 698 | n = refs[href]; |
| 699 | spans[i].innerHTML = |
| 700 | "[<a href='#_footnote_" + n + |
| 701 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 702 | } |
| 703 | } |
| 704 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 705 | }, |
| 706 | |
| 707 | install: function(toclevels) { |
| 708 | var timerId; |
| 709 | |
| 710 | function reinstall() { |
| 711 | asciidoc.footnotes(); |
| 712 | if (toclevels) { |
| 713 | asciidoc.toc(toclevels); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | function reinstallAndRemoveTimer() { |
| 718 | clearInterval(timerId); |
| 719 | reinstall(); |
| 720 | } |
| 721 | |
| 722 | timerId = setInterval(reinstall, 500); |
| 723 | if (document.addEventListener) |
| 724 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 725 | else |
| 726 | window.onload = reinstallAndRemoveTimer; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 727 | } |
| 728 | |
| 729 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 730 | asciidoc.install(); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 731 | /*]]>*/ |
| 732 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 733 | </head> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 734 | <body class="manpage"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 735 | <div id="header"> |
| 736 | <h1> |
| 737 | git-diff-files(1) Manual Page |
| 738 | </h1> |
| 739 | <h2>NAME</h2> |
| 740 | <div class="sectionbody"> |
| 741 | <p>git-diff-files - |
| 742 | Compares files in the working tree and the index |
| 743 | </p> |
| 744 | </div> |
| 745 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 746 | <div id="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 747 | <div class="sect1"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 748 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 749 | <div class="sectionbody"> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 750 | <div class="verseblock"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 751 | <pre class="content"><em>git diff-files</em> [-q] [-0|-1|-2|-3|-c|--cc] [<common diff options>] [<path>…]</pre> |
| 752 | <div class="attribution"> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 753 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 754 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 755 | </div> |
| 756 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 757 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 758 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 759 | <div class="paragraph"><p>Compares the files in the working tree and the index. When paths |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 760 | are specified, compares only those named paths. Otherwise all |
| 761 | entries in the index are compared. The output format is the |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 762 | same as for <em>git diff-index</em> and <em>git diff-tree</em>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 763 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 764 | </div> |
| 765 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 766 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 767 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 768 | <div class="dlist"><dl> |
| 769 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 770 | -p |
| 771 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 772 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 773 | -u |
| 774 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 775 | <dt class="hdlist1"> |
Junio C Hamano | e97d577 | 2010-05-19 08:13:58 | [diff] [blame] | 776 | --patch |
| 777 | </dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 778 | <dd> |
| 779 | <p> |
Junio C Hamano | ff97979 | 2007-11-16 10:11:30 | [diff] [blame] | 780 | Generate patch (see section on generating patches). |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 781 | </p> |
| 782 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 783 | <dt class="hdlist1"> |
Junio C Hamano | 58f587a | 2013-07-22 19:20:59 | [diff] [blame] | 784 | -s |
| 785 | </dt> |
| 786 | <dt class="hdlist1"> |
| 787 | --no-patch |
| 788 | </dt> |
| 789 | <dd> |
| 790 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 791 | Suppress diff output. Useful for commands like <code>git show</code> that |
| 792 | show the patch by default, or to cancel the effect of <code>--patch</code>. |
Junio C Hamano | 58f587a | 2013-07-22 19:20:59 | [diff] [blame] | 793 | </p> |
| 794 | </dd> |
| 795 | <dt class="hdlist1"> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 796 | -U<n> |
| 797 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 798 | <dt class="hdlist1"> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 799 | --unified=<n> |
| 800 | </dt> |
| 801 | <dd> |
| 802 | <p> |
| 803 | Generate diffs with <n> lines of context instead of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 804 | the usual three. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 805 | Implies <code>-p</code>. |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 806 | </p> |
| 807 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 808 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 809 | --raw |
| 810 | </dt> |
| 811 | <dd> |
| 812 | <p> |
Junio C Hamano | 85f1fde | 2015-06-01 20:37:32 | [diff] [blame] | 813 | Generate the diff in raw format. |
Junio C Hamano | 1dbca52 | 2015-05-22 20:48:55 | [diff] [blame] | 814 | This is the default. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 815 | </p> |
| 816 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 817 | <dt class="hdlist1"> |
Junio C Hamano | 54559c8 | 2006-04-13 07:45:12 | [diff] [blame] | 818 | --patch-with-raw |
| 819 | </dt> |
| 820 | <dd> |
| 821 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 822 | Synonym for <code>-p --raw</code>. |
Junio C Hamano | 54559c8 | 2006-04-13 07:45:12 | [diff] [blame] | 823 | </p> |
| 824 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 825 | <dt class="hdlist1"> |
Junio C Hamano | ad70bf0 | 2016-09-26 23:44:27 | [diff] [blame] | 826 | --indent-heuristic |
| 827 | </dt> |
Junio C Hamano | a65b676 | 2017-11-06 04:45:42 | [diff] [blame] | 828 | <dd> |
| 829 | <p> |
| 830 | Enable the heuristic that shift diff hunk boundaries to make patches |
| 831 | easier to read. This is the default. |
| 832 | </p> |
| 833 | </dd> |
Junio C Hamano | ad70bf0 | 2016-09-26 23:44:27 | [diff] [blame] | 834 | <dt class="hdlist1"> |
| 835 | --no-indent-heuristic |
| 836 | </dt> |
Junio C Hamano | 5f88833 | 2016-06-13 19:28:31 | [diff] [blame] | 837 | <dd> |
| 838 | <p> |
Junio C Hamano | a65b676 | 2017-11-06 04:45:42 | [diff] [blame] | 839 | Disable the indent heuristic. |
Junio C Hamano | 5f88833 | 2016-06-13 19:28:31 | [diff] [blame] | 840 | </p> |
| 841 | </dd> |
| 842 | <dt class="hdlist1"> |
Junio C Hamano | 5a73f30 | 2011-10-14 05:58:34 | [diff] [blame] | 843 | --minimal |
| 844 | </dt> |
| 845 | <dd> |
| 846 | <p> |
| 847 | Spend extra time to make sure the smallest possible |
| 848 | diff is produced. |
| 849 | </p> |
| 850 | </dd> |
| 851 | <dt class="hdlist1"> |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 852 | --patience |
| 853 | </dt> |
| 854 | <dd> |
| 855 | <p> |
| 856 | Generate a diff using the "patience diff" algorithm. |
| 857 | </p> |
| 858 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 859 | <dt class="hdlist1"> |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 860 | --histogram |
| 861 | </dt> |
| 862 | <dd> |
| 863 | <p> |
| 864 | Generate a diff using the "histogram diff" algorithm. |
| 865 | </p> |
| 866 | </dd> |
| 867 | <dt class="hdlist1"> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 868 | --diff-algorithm={patience|minimal|histogram|myers} |
| 869 | </dt> |
| 870 | <dd> |
| 871 | <p> |
| 872 | Choose a diff algorithm. The variants are as follows: |
| 873 | </p> |
| 874 | <div class="openblock"> |
| 875 | <div class="content"> |
| 876 | <div class="dlist"><dl> |
| 877 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 878 | <code>default</code>, <code>myers</code> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 879 | </dt> |
| 880 | <dd> |
| 881 | <p> |
| 882 | The basic greedy diff algorithm. Currently, this is the default. |
| 883 | </p> |
| 884 | </dd> |
| 885 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 886 | <code>minimal</code> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 887 | </dt> |
| 888 | <dd> |
| 889 | <p> |
| 890 | Spend extra time to make sure the smallest possible diff is |
| 891 | produced. |
| 892 | </p> |
| 893 | </dd> |
| 894 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 895 | <code>patience</code> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 896 | </dt> |
| 897 | <dd> |
| 898 | <p> |
| 899 | Use "patience diff" algorithm when generating patches. |
| 900 | </p> |
| 901 | </dd> |
| 902 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 903 | <code>histogram</code> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 904 | </dt> |
| 905 | <dd> |
| 906 | <p> |
| 907 | This algorithm extends the patience algorithm to "support |
| 908 | low-occurrence common elements". |
| 909 | </p> |
| 910 | </dd> |
| 911 | </dl></div> |
| 912 | </div></div> |
| 913 | <div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a |
| 914 | non-default value and want to use the default one, then you |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 915 | have to use <code>--diff-algorithm=default</code> option.</p></div> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 916 | </dd> |
| 917 | <dt class="hdlist1"> |
Junio C Hamano | 4c4b012 | 2011-06-30 01:19:32 | [diff] [blame] | 918 | --stat[=<width>[,<name-width>[,<count>]]] |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 919 | </dt> |
| 920 | <dd> |
| 921 | <p> |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 922 | Generate a diffstat. By default, as much space as necessary |
| 923 | will be used for the filename part, and the rest for the graph |
| 924 | part. Maximum width defaults to terminal width, or 80 columns |
Junio C Hamano | 7f2b3cb | 2012-06-22 22:42:39 | [diff] [blame] | 925 | if not connected to a terminal, and can be overridden by |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 926 | <code><width></code>. The width of the filename part can be limited by |
| 927 | giving another width <code><name-width></code> after a comma. The width |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 928 | of the graph part can be limited by using |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 929 | <code>--stat-graph-width=<width></code> (affects all commands generating |
| 930 | a stat graph) or by setting <code>diff.statGraphWidth=<width></code> |
| 931 | (does not affect <code>git format-patch</code>). |
| 932 | By giving a third parameter <code><count></code>, you can limit the |
| 933 | output to the first <code><count></code> lines, followed by <code>...</code> if |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 934 | there are more. |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 935 | </p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 936 | <div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=<width></code>, |
| 937 | <code>--stat-name-width=<name-width></code> and <code>--stat-count=<count></code>.</p></div> |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 938 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 939 | <dt class="hdlist1"> |
Junio C Hamano | fbe0052 | 2006-10-19 05:58:48 | [diff] [blame] | 940 | --numstat |
| 941 | </dt> |
| 942 | <dd> |
| 943 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 944 | Similar to <code>--stat</code>, but shows number of added and |
Junio C Hamano | fbe0052 | 2006-10-19 05:58:48 | [diff] [blame] | 945 | deleted lines in decimal notation and pathname without |
Junio C Hamano | d793de5 | 2006-12-26 09:11:43 | [diff] [blame] | 946 | abbreviation, to make it more machine friendly. For |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 947 | binary files, outputs two <code>-</code> instead of saying |
| 948 | <code>0 0</code>. |
Junio C Hamano | fbe0052 | 2006-10-19 05:58:48 | [diff] [blame] | 949 | </p> |
| 950 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 951 | <dt class="hdlist1"> |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 952 | --shortstat |
| 953 | </dt> |
| 954 | <dd> |
| 955 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 956 | Output only the last line of the <code>--stat</code> format containing total |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 957 | number of modified files, as well as number of added and deleted |
| 958 | lines. |
| 959 | </p> |
| 960 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 961 | <dt class="hdlist1"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 962 | --dirstat[=<param1,param2,…>] |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 963 | </dt> |
| 964 | <dd> |
| 965 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 966 | Output the distribution of relative amount of changes for each |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 967 | sub-directory. The behavior of <code>--dirstat</code> can be customized by |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 968 | passing it a comma separated list of parameters. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 969 | The defaults are controlled by the <code>diff.dirstat</code> configuration |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 970 | variable (see <a href="git-config.html">git-config(1)</a>). |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 971 | The following parameters are available: |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 972 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 973 | <div class="openblock"> |
| 974 | <div class="content"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 975 | <div class="dlist"><dl> |
| 976 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 977 | <code>changes</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 978 | </dt> |
| 979 | <dd> |
| 980 | <p> |
| 981 | Compute the dirstat numbers by counting the lines that have been |
| 982 | removed from the source, or added to the destination. This ignores |
| 983 | the amount of pure code movements within a file. In other words, |
| 984 | rearranging lines in a file is not counted as much as other changes. |
| 985 | This is the default behavior when no parameter is given. |
| 986 | </p> |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 987 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 988 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 989 | <code>lines</code> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 990 | </dt> |
| 991 | <dd> |
| 992 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 993 | Compute the dirstat numbers by doing the regular line-based diff |
| 994 | analysis, and summing the removed/added line counts. (For binary |
| 995 | files, count 64-byte chunks instead, since binary files have no |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 996 | natural concept of lines). This is a more expensive <code>--dirstat</code> |
| 997 | behavior than the <code>changes</code> behavior, but it does count rearranged |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 998 | lines within a file as much as other changes. The resulting output |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 999 | is consistent with what you get from the other <code>--*stat</code> options. |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1000 | </p> |
| 1001 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1002 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1003 | <code>files</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1004 | </dt> |
| 1005 | <dd> |
| 1006 | <p> |
| 1007 | Compute the dirstat numbers by counting the number of files changed. |
| 1008 | Each changed file counts equally in the dirstat analysis. This is |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1009 | the computationally cheapest <code>--dirstat</code> behavior, since it does |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1010 | not have to look at the file contents at all. |
| 1011 | </p> |
| 1012 | </dd> |
| 1013 | <dt class="hdlist1"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1014 | <code>cumulative</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1015 | </dt> |
| 1016 | <dd> |
| 1017 | <p> |
| 1018 | Count changes in a child directory for the parent directory as well. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1019 | Note that when using <code>cumulative</code>, the sum of the percentages |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1020 | reported may exceed 100%. The default (non-cumulative) behavior can |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1021 | be specified with the <code>noncumulative</code> parameter. |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1022 | </p> |
| 1023 | </dd> |
| 1024 | <dt class="hdlist1"> |
| 1025 | <limit> |
| 1026 | </dt> |
| 1027 | <dd> |
| 1028 | <p> |
| 1029 | An integer parameter specifies a cut-off percent (3% by default). |
| 1030 | Directories contributing less than this percentage of the changes |
| 1031 | are not shown in the output. |
| 1032 | </p> |
| 1033 | </dd> |
| 1034 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1035 | </div></div> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1036 | <div class="paragraph"><p>Example: The following will count changed files, while ignoring |
| 1037 | directories with less than 10% of the total amount of changed files, |
| 1038 | and accumulating child directory counts in the parent directories: |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1039 | <code>--dirstat=files,10,cumulative</code>.</p></div> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1040 | </dd> |
| 1041 | <dt class="hdlist1"> |
Junio C Hamano | 6959c6c | 2006-05-17 10:34:11 | [diff] [blame] | 1042 | --summary |
| 1043 | </dt> |
| 1044 | <dd> |
| 1045 | <p> |
| 1046 | Output a condensed summary of extended header information |
| 1047 | such as creations, renames and mode changes. |
| 1048 | </p> |
| 1049 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1050 | <dt class="hdlist1"> |
Junio C Hamano | d1308c9 | 2006-04-16 11:01:09 | [diff] [blame] | 1051 | --patch-with-stat |
| 1052 | </dt> |
| 1053 | <dd> |
| 1054 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1055 | Synonym for <code>-p --stat</code>. |
Junio C Hamano | d1308c9 | 2006-04-16 11:01:09 | [diff] [blame] | 1056 | </p> |
| 1057 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1058 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1059 | -z |
| 1060 | </dt> |
| 1061 | <dd> |
| 1062 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1063 | When <code>--raw</code>, <code>--numstat</code>, <code>--name-only</code> or <code>--name-status</code> has been |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1064 | given, do not munge pathnames and use NULs as output field terminators. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1065 | </p> |
Junio C Hamano | 0f6f3bf | 2017-03-13 07:01:53 | [diff] [blame] | 1066 | <div class="paragraph"><p>Without this option, pathnames with "unusual" characters are quoted as |
| 1067 | explained for the configuration variable <code>core.quotePath</code> (see |
| 1068 | <a href="git-config.html">git-config(1)</a>).</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1069 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1070 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1071 | --name-only |
| 1072 | </dt> |
| 1073 | <dd> |
| 1074 | <p> |
| 1075 | Show only names of changed files. |
| 1076 | </p> |
| 1077 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1078 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1079 | --name-status |
| 1080 | </dt> |
| 1081 | <dd> |
| 1082 | <p> |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 1083 | Show only names and status of changed files. See the description |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1084 | of the <code>--diff-filter</code> option on what the status letters mean. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1085 | </p> |
| 1086 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1087 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1088 | --submodule[=<format>] |
| 1089 | </dt> |
| 1090 | <dd> |
| 1091 | <p> |
Junio C Hamano | cd45166 | 2016-09-13 00:54:09 | [diff] [blame] | 1092 | Specify how differences in submodules are shown. When specifying |
| 1093 | <code>--submodule=short</code> the <em>short</em> format is used. This format just |
| 1094 | shows the names of the commits at the beginning and end of the range. |
| 1095 | When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em> |
| 1096 | format is used. This format lists the commits in the range like |
| 1097 | <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code> |
| 1098 | is specified, the <em>diff</em> format is used. This format shows an |
| 1099 | inline diff of the changes in the submodule contents between the |
| 1100 | commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format |
| 1101 | if the config option is unset. |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1102 | </p> |
| 1103 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1104 | <dt class="hdlist1"> |
Junio C Hamano | 4aa0bcc | 2010-03-03 05:13:12 | [diff] [blame] | 1105 | --color[=<when>] |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1106 | </dt> |
| 1107 | <dd> |
| 1108 | <p> |
| 1109 | Show colored diff. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1110 | <code>--color</code> (i.e. without <em>=<when></em>) is the same as <code>--color=always</code>. |
| 1111 | <em><when></em> can be one of <code>always</code>, <code>never</code>, or <code>auto</code>. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1112 | </p> |
| 1113 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1114 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1115 | --no-color |
| 1116 | </dt> |
| 1117 | <dd> |
| 1118 | <p> |
Junio C Hamano | 5f2627d | 2011-05-06 20:23:48 | [diff] [blame] | 1119 | Turn off colored diff. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1120 | It is the same as <code>--color=never</code>. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1121 | </p> |
| 1122 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1123 | <dt class="hdlist1"> |
Junio C Hamano | fb1fdf1 | 2017-08-27 06:14:59 | [diff] [blame] | 1124 | --color-moved[=<mode>] |
| 1125 | </dt> |
| 1126 | <dd> |
| 1127 | <p> |
| 1128 | Moved lines of code are colored differently. |
| 1129 | The <mode> defaults to <em>no</em> if the option is not given |
| 1130 | and to <em>zebra</em> if the option with no mode is given. |
| 1131 | The mode must be one of: |
| 1132 | </p> |
| 1133 | <div class="openblock"> |
| 1134 | <div class="content"> |
| 1135 | <div class="dlist"><dl> |
| 1136 | <dt class="hdlist1"> |
| 1137 | no |
| 1138 | </dt> |
| 1139 | <dd> |
| 1140 | <p> |
| 1141 | Moved lines are not highlighted. |
| 1142 | </p> |
| 1143 | </dd> |
| 1144 | <dt class="hdlist1"> |
| 1145 | default |
| 1146 | </dt> |
| 1147 | <dd> |
| 1148 | <p> |
| 1149 | Is a synonym for <code>zebra</code>. This may change to a more sensible mode |
| 1150 | in the future. |
| 1151 | </p> |
| 1152 | </dd> |
| 1153 | <dt class="hdlist1"> |
| 1154 | plain |
| 1155 | </dt> |
| 1156 | <dd> |
| 1157 | <p> |
| 1158 | Any line that is added in one location and was removed |
| 1159 | in another location will be colored with <em>color.diff.newMoved</em>. |
| 1160 | Similarly <em>color.diff.oldMoved</em> will be used for removed lines |
| 1161 | that are added somewhere else in the diff. This mode picks up any |
| 1162 | moved line, but it is not very useful in a review to determine |
| 1163 | if a block of code was moved without permutation. |
| 1164 | </p> |
| 1165 | </dd> |
| 1166 | <dt class="hdlist1"> |
| 1167 | zebra |
| 1168 | </dt> |
| 1169 | <dd> |
| 1170 | <p> |
| 1171 | Blocks of moved text of at least 20 alphanumeric characters |
| 1172 | are detected greedily. The detected blocks are |
| 1173 | painted using either the <em>color.diff.{old,new}Moved</em> color or |
| 1174 | <em>color.diff.{old,new}MovedAlternative</em>. The change between |
| 1175 | the two colors indicates that a new block was detected. |
| 1176 | </p> |
| 1177 | </dd> |
| 1178 | <dt class="hdlist1"> |
| 1179 | dimmed_zebra |
| 1180 | </dt> |
| 1181 | <dd> |
| 1182 | <p> |
| 1183 | Similar to <em>zebra</em>, but additional dimming of uninteresting parts |
| 1184 | of moved code is performed. The bordering lines of two adjacent |
| 1185 | blocks are considered interesting, the rest is uninteresting. |
| 1186 | </p> |
| 1187 | </dd> |
| 1188 | </dl></div> |
| 1189 | </div></div> |
| 1190 | </dd> |
| 1191 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1192 | --word-diff[=<mode>] |
Junio C Hamano | 85e45fa | 2006-08-13 07:47:41 | [diff] [blame] | 1193 | </dt> |
| 1194 | <dd> |
| 1195 | <p> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1196 | Show a word diff, using the <mode> to delimit changed words. |
| 1197 | By default, words are delimited by whitespace; see |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1198 | <code>--word-diff-regex</code> below. The <mode> defaults to <em>plain</em>, and |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1199 | must be one of: |
Junio C Hamano | 85e45fa | 2006-08-13 07:47:41 | [diff] [blame] | 1200 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1201 | <div class="openblock"> |
| 1202 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1203 | <div class="dlist"><dl> |
| 1204 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1205 | color |
| 1206 | </dt> |
| 1207 | <dd> |
| 1208 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1209 | Highlight changed words using only colors. Implies <code>--color</code>. |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1210 | </p> |
| 1211 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1212 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1213 | plain |
| 1214 | </dt> |
| 1215 | <dd> |
| 1216 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1217 | Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1218 | attempts to escape the delimiters if they appear in the input, |
| 1219 | so the output may be ambiguous. |
| 1220 | </p> |
| 1221 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1222 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1223 | porcelain |
| 1224 | </dt> |
| 1225 | <dd> |
| 1226 | <p> |
| 1227 | Use a special line-based format intended for script |
| 1228 | consumption. Added/removed/unchanged runs are printed in the |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1229 | usual unified diff format, starting with a <code>+</code>/<code>-</code>/` ` |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1230 | character at the beginning of the line and extending to the |
| 1231 | end of the line. Newlines in the input are represented by a |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1232 | tilde <code>~</code> on a line of its own. |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1233 | </p> |
| 1234 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1235 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1236 | none |
| 1237 | </dt> |
| 1238 | <dd> |
| 1239 | <p> |
| 1240 | Disable word diff again. |
| 1241 | </p> |
| 1242 | </dd> |
| 1243 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1244 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1245 | <div class="paragraph"><p>Note that despite the name of the first mode, color is used to |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1246 | highlight the changed parts in all modes if enabled.</p></div> |
| 1247 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1248 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1249 | --word-diff-regex=<regex> |
| 1250 | </dt> |
| 1251 | <dd> |
| 1252 | <p> |
| 1253 | Use <regex> to decide what a word is, instead of considering |
| 1254 | runs of non-whitespace to be a word. Also implies |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1255 | <code>--word-diff</code> unless it was already enabled. |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1256 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1257 | <div class="paragraph"><p>Every non-overlapping match of the |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 1258 | <regex> is considered a word. Anything between these matches is |
| 1259 | considered whitespace and ignored(!) for the purposes of finding |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1260 | differences. You may want to append <code>|[^[:space:]]</code> to your regular |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 1261 | expression to make sure that it matches all non-whitespace characters. |
| 1262 | A match that contains a newline is silently truncated(!) at the |
| 1263 | newline.</p></div> |
Junio C Hamano | 713eded | 2015-12-03 00:24:02 | [diff] [blame] | 1264 | <div class="paragraph"><p>For example, <code>--word-diff-regex=.</code> will treat each character as a word |
| 1265 | and, correspondingly, show differences character by character.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1266 | <div class="paragraph"><p>The regex can also be set via a diff driver or configuration option, see |
Junio C Hamano | 198b1f1 | 2016-05-17 22:27:24 | [diff] [blame] | 1267 | <a href="gitattributes.html">gitattributes(5)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 1268 | overrides any diff driver or configuration setting. Diff drivers |
| 1269 | override configuration settings.</p></div> |
Junio C Hamano | 85e45fa | 2006-08-13 07:47:41 | [diff] [blame] | 1270 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1271 | <dt class="hdlist1"> |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1272 | --color-words[=<regex>] |
| 1273 | </dt> |
| 1274 | <dd> |
| 1275 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1276 | Equivalent to <code>--word-diff=color</code> plus (if a regex was |
| 1277 | specified) <code>--word-diff-regex=<regex></code>. |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 1278 | </p> |
| 1279 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1280 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1281 | --no-renames |
| 1282 | </dt> |
| 1283 | <dd> |
| 1284 | <p> |
| 1285 | Turn off rename detection, even when the configuration |
| 1286 | file gives the default to do so. |
| 1287 | </p> |
| 1288 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1289 | <dt class="hdlist1"> |
Junio C Hamano | a890c4f | 2007-01-28 10:29:21 | [diff] [blame] | 1290 | --check |
| 1291 | </dt> |
| 1292 | <dd> |
| 1293 | <p> |
Junio C Hamano | 84ea1e4 | 2016-04-08 21:53:48 | [diff] [blame] | 1294 | Warn if changes introduce conflict markers or whitespace errors. |
| 1295 | What are considered whitespace errors is controlled by <code>core.whitespace</code> |
Junio C Hamano | 6005bfa | 2011-06-23 00:51:22 | [diff] [blame] | 1296 | configuration. By default, trailing whitespaces (including |
| 1297 | lines that solely consist of whitespaces) and a space character |
| 1298 | that is immediately followed by a tab character inside the |
| 1299 | initial indent of the line are considered whitespace errors. |
| 1300 | Exits with non-zero status if problems are found. Not compatible |
| 1301 | with --exit-code. |
Junio C Hamano | a890c4f | 2007-01-28 10:29:21 | [diff] [blame] | 1302 | </p> |
| 1303 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1304 | <dt class="hdlist1"> |
Junio C Hamano | 8c5d594 | 2015-06-11 19:37:48 | [diff] [blame] | 1305 | --ws-error-highlight=<kind> |
| 1306 | </dt> |
| 1307 | <dd> |
| 1308 | <p> |
Junio C Hamano | 4b2a6c1 | 2017-08-22 18:32:37 | [diff] [blame] | 1309 | Highlight whitespace errors in the <code>context</code>, <code>old</code> or <code>new</code> |
| 1310 | lines of the diff. Multiple values are separated by comma, |
| 1311 | <code>none</code> resets previous values, <code>default</code> reset the list to |
| 1312 | <code>new</code> and <code>all</code> is a shorthand for <code>old,new,context</code>. When |
| 1313 | this option is not given, and the configuration variable |
| 1314 | <code>diff.wsErrorHighlight</code> is not set, only whitespace errors in |
| 1315 | <code>new</code> lines are highlighted. The whitespace errors are colored |
| 1316 | whith <code>color.diff.whitespace</code>. |
Junio C Hamano | 8c5d594 | 2015-06-11 19:37:48 | [diff] [blame] | 1317 | </p> |
| 1318 | </dd> |
| 1319 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1320 | --full-index |
| 1321 | </dt> |
| 1322 | <dd> |
| 1323 | <p> |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 1324 | Instead of the first handful of characters, show the full |
| 1325 | pre- and post-image blob object names on the "index" |
| 1326 | line when generating patch format output. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1327 | </p> |
| 1328 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1329 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1330 | --binary |
| 1331 | </dt> |
| 1332 | <dd> |
| 1333 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1334 | In addition to <code>--full-index</code>, output a binary diff that |
| 1335 | can be applied with <code>git-apply</code>. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1336 | </p> |
| 1337 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1338 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1339 | --abbrev[=<n>] |
| 1340 | </dt> |
| 1341 | <dd> |
| 1342 | <p> |
| 1343 | Instead of showing the full 40-byte hexadecimal object |
| 1344 | name in diff-raw format output and diff-tree header |
Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 1345 | lines, show only a partial prefix. This is |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1346 | independent of the <code>--full-index</code> option above, which controls |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1347 | the diff-patch output format. Non default number of |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1348 | digits can be specified with <code>--abbrev=<n></code>. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1349 | </p> |
| 1350 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1351 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1352 | -B[<n>][/<m>] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1353 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1354 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1355 | --break-rewrites[=[<n>][/<m>]] |
| 1356 | </dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1357 | <dd> |
| 1358 | <p> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1359 | Break complete rewrite changes into pairs of delete and |
| 1360 | create. This serves two purposes: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1361 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1362 | <div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1363 | not as a series of deletion and insertion mixed together with a very |
| 1364 | few lines that happen to match textually as the context, but as a |
| 1365 | single deletion of everything old followed by a single insertion of |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1366 | everything new, and the number <code>m</code> controls this aspect of the -B |
| 1367 | option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1368 | original should remain in the result for Git to consider it a total |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1369 | rewrite (i.e. otherwise the resulting patch will be a series of |
| 1370 | deletion and insertion mixed together with context lines).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1371 | <div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1372 | source of a rename (usually -M only considers a file that disappeared |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1373 | as the source of a rename), and the number <code>n</code> controls this aspect of |
| 1374 | the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1375 | addition and deletion compared to 20% or more of the file’s size are |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1376 | eligible for being picked up as a possible source of a rename to |
| 1377 | another file.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1378 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1379 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1380 | -M[<n>] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1381 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1382 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1383 | --find-renames[=<n>] |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1384 | </dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1385 | <dd> |
| 1386 | <p> |
| 1387 | Detect renames. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1388 | If <code>n</code> is specified, it is a threshold on the similarity |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1389 | index (i.e. amount of addition/deletions compared to the |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1390 | file’s size). For example, <code>-M90%</code> means Git should consider a |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1391 | delete/add pair to be a rename if more than 90% of the file |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1392 | hasn’t changed. Without a <code>%</code> sign, the number is to be read as |
| 1393 | a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes |
| 1394 | 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is |
| 1395 | the same as <code>-M5%</code>. To limit detection to exact renames, use |
| 1396 | <code>-M100%</code>. The default similarity index is 50%. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1397 | </p> |
| 1398 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1399 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1400 | -C[<n>] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1401 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1402 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1403 | --find-copies[=<n>] |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1404 | </dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1405 | <dd> |
| 1406 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1407 | Detect copies as well as renames. See also <code>--find-copies-harder</code>. |
| 1408 | If <code>n</code> is specified, it has the same meaning as for <code>-M<n></code>. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1409 | </p> |
| 1410 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1411 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1412 | --find-copies-harder |
| 1413 | </dt> |
| 1414 | <dd> |
| 1415 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1416 | For performance reasons, by default, <code>-C</code> option finds copies only |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1417 | if the original file of the copy was modified in the same |
| 1418 | changeset. This flag makes the command |
| 1419 | inspect unmodified files as candidates for the source of |
| 1420 | copy. This is a very expensive operation for large |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 1421 | projects, so use it with caution. Giving more than one |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1422 | <code>-C</code> option has the same effect. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1423 | </p> |
| 1424 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1425 | <dt class="hdlist1"> |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 1426 | -D |
| 1427 | </dt> |
| 1428 | <dt class="hdlist1"> |
| 1429 | --irreversible-delete |
| 1430 | </dt> |
| 1431 | <dd> |
| 1432 | <p> |
| 1433 | Omit the preimage for deletes, i.e. print only the header but not |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1434 | the diff between the preimage and <code>/dev/null</code>. The resulting patch |
| 1435 | is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 1436 | solely for people who want to just concentrate on reviewing the |
Junio C Hamano | d16fd1b | 2017-08-04 16:41:51 | [diff] [blame] | 1437 | text after the change. In addition, the output obviously lacks |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 1438 | enough information to apply such a patch in reverse, even manually, |
| 1439 | hence the name of the option. |
| 1440 | </p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1441 | <div class="paragraph"><p>When used together with <code>-B</code>, omit also the preimage in the deletion part |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 1442 | of a delete/create pair.</p></div> |
| 1443 | </dd> |
| 1444 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1445 | -l<num> |
| 1446 | </dt> |
| 1447 | <dd> |
| 1448 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1449 | The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1450 | is the number of potential rename/copy targets. This |
| 1451 | option prevents rename/copy detection from running if |
| 1452 | the number of rename/copy targets exceeds the specified |
| 1453 | number. |
| 1454 | </p> |
| 1455 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1456 | <dt class="hdlist1"> |
Junio C Hamano | 982eb11 | 2010-11-18 00:53:09 | [diff] [blame] | 1457 | --diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]] |
| 1458 | </dt> |
| 1459 | <dd> |
| 1460 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1461 | Select only files that are Added (<code>A</code>), Copied (<code>C</code>), |
| 1462 | Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their |
| 1463 | type (i.e. regular file, symlink, submodule, …) changed (<code>T</code>), |
| 1464 | are Unmerged (<code>U</code>), are |
| 1465 | Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>). |
Junio C Hamano | 982eb11 | 2010-11-18 00:53:09 | [diff] [blame] | 1466 | Any combination of the filter characters (including none) can be used. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1467 | When <code>*</code> (All-or-none) is added to the combination, all |
Junio C Hamano | 982eb11 | 2010-11-18 00:53:09 | [diff] [blame] | 1468 | paths are selected if there is any file that matches |
| 1469 | other criteria in the comparison; if there is no file |
| 1470 | that matches other criteria, nothing is selected. |
| 1471 | </p> |
Junio C Hamano | eed15af | 2016-07-25 22:49:42 | [diff] [blame] | 1472 | <div class="paragraph"><p>Also, these upper-case letters can be downcased to exclude. E.g. |
| 1473 | <code>--diff-filter=ad</code> excludes added and deleted paths.</p></div> |
Junio C Hamano | 982eb11 | 2010-11-18 00:53:09 | [diff] [blame] | 1474 | </dd> |
| 1475 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1476 | -S<string> |
| 1477 | </dt> |
| 1478 | <dd> |
| 1479 | <p> |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1480 | Look for differences that change the number of occurrences of |
| 1481 | the specified string (i.e. addition/deletion) in a file. |
| 1482 | Intended for the scripter’s use. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1483 | </p> |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1484 | <div class="paragraph"><p>It is useful when you’re looking for an exact block of code (like a |
| 1485 | struct), and want to know the history of that block since it first |
| 1486 | came into being: use the feature iteratively to feed the interesting |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1487 | block in the preimage back into <code>-S</code>, and keep going until you get the |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1488 | very first version of the block.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1489 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1490 | <dt class="hdlist1"> |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 1491 | -G<regex> |
| 1492 | </dt> |
| 1493 | <dd> |
| 1494 | <p> |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1495 | Look for differences whose patch text contains added/removed |
| 1496 | lines that match <regex>. |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 1497 | </p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1498 | <div class="paragraph"><p>To illustrate the difference between <code>-S<regex> --pickaxe-regex</code> and |
| 1499 | <code>-G<regex></code>, consider a commit with the following diff in the same |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1500 | file:</p></div> |
| 1501 | <div class="listingblock"> |
| 1502 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1503 | <pre><code>+ return !regexec(regexp, two->ptr, 1, &regmatch, 0); |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1504 | ... |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1505 | - hit = !regexec(regexp, mf2.ptr, 1, &regmatch, 0);</code></pre> |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1506 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1507 | <div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log |
| 1508 | -S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1509 | occurrences of that string did not change).</p></div> |
| 1510 | <div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more |
| 1511 | information.</p></div> |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 1512 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1513 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1514 | --pickaxe-all |
| 1515 | </dt> |
| 1516 | <dd> |
| 1517 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1518 | When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1519 | changeset, not just the files that contain the change |
| 1520 | in <string>. |
| 1521 | </p> |
| 1522 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1523 | <dt class="hdlist1"> |
Junio C Hamano | bfe9e75 | 2006-04-05 21:43:28 | [diff] [blame] | 1524 | --pickaxe-regex |
| 1525 | </dt> |
| 1526 | <dd> |
| 1527 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1528 | Treat the <string> given to <code>-S</code> as an extended POSIX regular |
Junio C Hamano | f1f5a7b | 2013-06-11 22:23:52 | [diff] [blame] | 1529 | expression to match. |
Junio C Hamano | bfe9e75 | 2006-04-05 21:43:28 | [diff] [blame] | 1530 | </p> |
| 1531 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1532 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1533 | -O<orderfile> |
| 1534 | </dt> |
| 1535 | <dd> |
| 1536 | <p> |
Junio C Hamano | bcd98f4 | 2017-01-24 00:12:16 | [diff] [blame] | 1537 | Control the order in which files appear in the output. |
Junio C Hamano | 322c624 | 2015-03-23 21:32:46 | [diff] [blame] | 1538 | This overrides the <code>diff.orderFile</code> configuration variable |
| 1539 | (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>, |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1540 | use <code>-O/dev/null</code>. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1541 | </p> |
Junio C Hamano | bcd98f4 | 2017-01-24 00:12:16 | [diff] [blame] | 1542 | <div class="paragraph"><p>The output order is determined by the order of glob patterns in |
| 1543 | <orderfile>. |
| 1544 | All files with pathnames that match the first pattern are output |
| 1545 | first, all files with pathnames that match the second pattern (but not |
| 1546 | the first) are output next, and so on. |
| 1547 | All files with pathnames that do not match any pattern are output |
| 1548 | last, as if there was an implicit match-all pattern at the end of the |
| 1549 | file. |
| 1550 | If multiple pathnames have the same rank (they match the same pattern |
| 1551 | but no earlier patterns), their output order relative to each other is |
| 1552 | the normal order.</p></div> |
| 1553 | <div class="paragraph"><p><orderfile> is parsed as follows:</p></div> |
| 1554 | <div class="openblock"> |
| 1555 | <div class="content"> |
| 1556 | <div class="ulist"><ul> |
| 1557 | <li> |
| 1558 | <p> |
| 1559 | Blank lines are ignored, so they can be used as separators for |
| 1560 | readability. |
| 1561 | </p> |
| 1562 | </li> |
| 1563 | <li> |
| 1564 | <p> |
| 1565 | Lines starting with a hash ("<code>#</code>") are ignored, so they can be used |
| 1566 | for comments. Add a backslash ("<code>\</code>") to the beginning of the |
| 1567 | pattern if it starts with a hash. |
| 1568 | </p> |
| 1569 | </li> |
| 1570 | <li> |
| 1571 | <p> |
| 1572 | Each other line contains a single pattern. |
| 1573 | </p> |
| 1574 | </li> |
| 1575 | </ul></div> |
| 1576 | </div></div> |
| 1577 | <div class="paragraph"><p>Patterns have the same syntax and semantics as patterns used for |
| 1578 | fnmantch(3) without the FNM_PATHNAME flag, except a pathname also |
| 1579 | matches a pattern if removing any number of the final pathname |
| 1580 | components matches the pattern. For example, the pattern "<code>foo*bar</code>" |
| 1581 | matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1582 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1583 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1584 | -R |
| 1585 | </dt> |
| 1586 | <dd> |
| 1587 | <p> |
| 1588 | Swap two inputs; that is, show differences from index or |
| 1589 | on-disk file to tree contents. |
| 1590 | </p> |
| 1591 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1592 | <dt class="hdlist1"> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1593 | --relative[=<path>] |
| 1594 | </dt> |
| 1595 | <dd> |
| 1596 | <p> |
| 1597 | When run from a subdirectory of the project, it can be |
| 1598 | told to exclude changes outside the directory and show |
| 1599 | pathnames relative to it with this option. When you are |
| 1600 | not in a subdirectory (e.g. in a bare repository), you |
| 1601 | can name which subdirectory to make the output relative |
| 1602 | to by giving a <path> as an argument. |
| 1603 | </p> |
| 1604 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1605 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 1606 | -a |
| 1607 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1608 | <dt class="hdlist1"> |
Junio C Hamano | c26f548 | 2006-07-09 09:38:14 | [diff] [blame] | 1609 | --text |
| 1610 | </dt> |
| 1611 | <dd> |
| 1612 | <p> |
| 1613 | Treat all files as text. |
| 1614 | </p> |
| 1615 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1616 | <dt class="hdlist1"> |
Junio C Hamano | 4886c77 | 2017-11-27 03:33:28 | [diff] [blame^] | 1617 | --ignore-cr-at-eol |
| 1618 | </dt> |
| 1619 | <dd> |
| 1620 | <p> |
| 1621 | Ignore carrige-return at the end of line when doing a comparison. |
| 1622 | </p> |
| 1623 | </dd> |
| 1624 | <dt class="hdlist1"> |
Junio C Hamano | fd46896 | 2007-02-14 23:45:04 | [diff] [blame] | 1625 | --ignore-space-at-eol |
| 1626 | </dt> |
| 1627 | <dd> |
| 1628 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 1629 | Ignore changes in whitespace at EOL. |
Junio C Hamano | fd46896 | 2007-02-14 23:45:04 | [diff] [blame] | 1630 | </p> |
| 1631 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1632 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 1633 | -b |
| 1634 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1635 | <dt class="hdlist1"> |
Junio C Hamano | d9c2d2f | 2006-12-06 08:59:07 | [diff] [blame] | 1636 | --ignore-space-change |
| 1637 | </dt> |
| 1638 | <dd> |
| 1639 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 1640 | Ignore changes in amount of whitespace. This ignores whitespace |
| 1641 | at line end, and considers all other sequences of one or |
| 1642 | more whitespace characters to be equivalent. |
Junio C Hamano | d9c2d2f | 2006-12-06 08:59:07 | [diff] [blame] | 1643 | </p> |
| 1644 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1645 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 1646 | -w |
Junio C Hamano | d9c2d2f | 2006-12-06 08:59:07 | [diff] [blame] | 1647 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1648 | <dt class="hdlist1"> |
Junio C Hamano | d9c2d2f | 2006-12-06 08:59:07 | [diff] [blame] | 1649 | --ignore-all-space |
| 1650 | </dt> |
| 1651 | <dd> |
| 1652 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 1653 | Ignore whitespace when comparing lines. This ignores |
| 1654 | differences even if one line has whitespace where the other |
Junio C Hamano | d9c2d2f | 2006-12-06 08:59:07 | [diff] [blame] | 1655 | line has none. |
| 1656 | </p> |
| 1657 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1658 | <dt class="hdlist1"> |
Junio C Hamano | a195230 | 2013-07-01 21:31:18 | [diff] [blame] | 1659 | --ignore-blank-lines |
| 1660 | </dt> |
| 1661 | <dd> |
| 1662 | <p> |
| 1663 | Ignore changes whose lines are all blank. |
| 1664 | </p> |
| 1665 | </dd> |
| 1666 | <dt class="hdlist1"> |
Junio C Hamano | 1d40ee8 | 2009-01-07 10:14:16 | [diff] [blame] | 1667 | --inter-hunk-context=<lines> |
| 1668 | </dt> |
| 1669 | <dd> |
| 1670 | <p> |
| 1671 | Show the context between diff hunks, up to the specified number |
| 1672 | of lines, thereby fusing hunks that are close to each other. |
Junio C Hamano | bcd98f4 | 2017-01-24 00:12:16 | [diff] [blame] | 1673 | Defaults to <code>diff.interHunkContext</code> or 0 if the config option |
| 1674 | is unset. |
Junio C Hamano | 1d40ee8 | 2009-01-07 10:14:16 | [diff] [blame] | 1675 | </p> |
| 1676 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1677 | <dt class="hdlist1"> |
Junio C Hamano | 11821ed | 2011-10-19 18:42:09 | [diff] [blame] | 1678 | -W |
| 1679 | </dt> |
| 1680 | <dt class="hdlist1"> |
| 1681 | --function-context |
| 1682 | </dt> |
| 1683 | <dd> |
| 1684 | <p> |
| 1685 | Show whole surrounding functions of changes. |
| 1686 | </p> |
| 1687 | </dd> |
| 1688 | <dt class="hdlist1"> |
Junio C Hamano | 48fd2f6 | 2007-03-19 02:02:30 | [diff] [blame] | 1689 | --exit-code |
| 1690 | </dt> |
| 1691 | <dd> |
| 1692 | <p> |
| 1693 | Make the program exit with codes similar to diff(1). |
| 1694 | That is, it exits with 1 if there were differences and |
| 1695 | 0 means no differences. |
| 1696 | </p> |
| 1697 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1698 | <dt class="hdlist1"> |
Junio C Hamano | 35e5755 | 2007-03-25 07:54:35 | [diff] [blame] | 1699 | --quiet |
| 1700 | </dt> |
| 1701 | <dd> |
| 1702 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1703 | Disable all output of the program. Implies <code>--exit-code</code>. |
Junio C Hamano | 35e5755 | 2007-03-25 07:54:35 | [diff] [blame] | 1704 | </p> |
| 1705 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1706 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1707 | --ext-diff |
| 1708 | </dt> |
| 1709 | <dd> |
| 1710 | <p> |
| 1711 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1712 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 1713 | to use this option with <a href="git-log.html">git-log(1)</a> and friends. |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1714 | </p> |
| 1715 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1716 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1717 | --no-ext-diff |
| 1718 | </dt> |
| 1719 | <dd> |
| 1720 | <p> |
| 1721 | Disallow external diff drivers. |
| 1722 | </p> |
| 1723 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1724 | <dt class="hdlist1"> |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 1725 | --textconv |
| 1726 | </dt> |
| 1727 | <dt class="hdlist1"> |
| 1728 | --no-textconv |
| 1729 | </dt> |
| 1730 | <dd> |
| 1731 | <p> |
| 1732 | Allow (or disallow) external text conversion filters to be run |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1733 | when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 1734 | details. Because textconv filters are typically a one-way |
| 1735 | conversion, the resulting diff is suitable for human |
| 1736 | consumption, but cannot be applied. For this reason, textconv |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1737 | filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and |
| 1738 | <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 1739 | diff plumbing commands. |
| 1740 | </p> |
| 1741 | </dd> |
| 1742 | <dt class="hdlist1"> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 1743 | --ignore-submodules[=<when>] |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 1744 | </dt> |
| 1745 | <dd> |
| 1746 | <p> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 1747 | Ignore changes to submodules in the diff generation. <when> can be |
Junio C Hamano | c710296 | 2013-05-29 23:57:17 | [diff] [blame] | 1748 | either "none", "untracked", "dirty" or "all", which is the default. |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 1749 | Using "none" will consider the submodule modified when it either contains |
| 1750 | untracked or modified files or its HEAD differs from the commit recorded |
| 1751 | in the superproject and can be used to override any settings of the |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1752 | <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 1753 | "untracked" is used submodules are not considered dirty when they only |
| 1754 | contain untracked content (but they are still scanned for modified |
| 1755 | content). Using "dirty" ignores all changes to the work tree of submodules, |
| 1756 | only changes to the commits stored in the superproject are shown (this was |
| 1757 | the behavior until 1.7.0). Using "all" hides all changes to submodules. |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 1758 | </p> |
| 1759 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1760 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 1761 | --src-prefix=<prefix> |
| 1762 | </dt> |
| 1763 | <dd> |
| 1764 | <p> |
| 1765 | Show the given source prefix instead of "a/". |
| 1766 | </p> |
| 1767 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1768 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 1769 | --dst-prefix=<prefix> |
| 1770 | </dt> |
| 1771 | <dd> |
| 1772 | <p> |
| 1773 | Show the given destination prefix instead of "b/". |
| 1774 | </p> |
| 1775 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1776 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 1777 | --no-prefix |
| 1778 | </dt> |
| 1779 | <dd> |
| 1780 | <p> |
| 1781 | Do not show any source or destination prefix. |
| 1782 | </p> |
| 1783 | </dd> |
Junio C Hamano | cd45166 | 2016-09-13 00:54:09 | [diff] [blame] | 1784 | <dt class="hdlist1"> |
| 1785 | --line-prefix=<prefix> |
| 1786 | </dt> |
| 1787 | <dd> |
| 1788 | <p> |
| 1789 | Prepend an additional prefix to every line of output. |
| 1790 | </p> |
| 1791 | </dd> |
Junio C Hamano | f7017f1 | 2016-10-27 23:31:34 | [diff] [blame] | 1792 | <dt class="hdlist1"> |
| 1793 | --ita-invisible-in-index |
| 1794 | </dt> |
| 1795 | <dd> |
| 1796 | <p> |
| 1797 | By default entries added by "git add -N" appear as an existing |
| 1798 | empty file in "git diff" and a new file in "git diff --cached". |
| 1799 | This option makes the entry appear as a new file in "git diff" |
| 1800 | and non-existent in "git diff --cached". This option could be |
| 1801 | reverted with <code>--ita-visible-in-index</code>. Both options are |
| 1802 | experimental and could be removed in future. |
| 1803 | </p> |
| 1804 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1805 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1806 | <div class="paragraph"><p>For more detailed explanation on these common options, see also |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1807 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1808 | <div class="dlist"><dl> |
| 1809 | <dt class="hdlist1"> |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 1810 | -1 --base |
| 1811 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1812 | <dt class="hdlist1"> |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 1813 | -2 --ours |
| 1814 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1815 | <dt class="hdlist1"> |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 1816 | -3 --theirs |
| 1817 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1818 | <dt class="hdlist1"> |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 1819 | -0 |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1820 | </dt> |
| 1821 | <dd> |
| 1822 | <p> |
| 1823 | Diff against the "base" version, "our branch" or "their |
| 1824 | branch" respectively. With these options, diffs for |
| 1825 | merged entries are not shown. |
| 1826 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1827 | <div class="paragraph"><p>The default is to diff against our branch (-2) and the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1828 | cleanly resolved paths. The option -0 can be given to |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1829 | omit diff output for unmerged entries and just show "Unmerged".</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1830 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1831 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1832 | -c |
| 1833 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1834 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1835 | --cc |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 1836 | </dt> |
| 1837 | <dd> |
| 1838 | <p> |
| 1839 | This compares stage 2 (our branch), stage 3 (their |
| 1840 | branch) and the working tree file and outputs a combined |
| 1841 | diff, similar to the way <em>diff-tree</em> shows a merge |
| 1842 | commit with these flags. |
| 1843 | </p> |
| 1844 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1845 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1846 | -q |
| 1847 | </dt> |
| 1848 | <dd> |
| 1849 | <p> |
Junio C Hamano | 51c2ab0 | 2006-07-09 20:38:54 | [diff] [blame] | 1850 | Remain silent even on nonexistent files |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1851 | </p> |
| 1852 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1853 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1854 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1855 | </div> |
| 1856 | <div class="sect1"> |
Junio C Hamano | 543f8d6 | 2009-07-29 08:35:21 | [diff] [blame] | 1857 | <h2 id="_raw_output_format">Raw output format</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1858 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1859 | <div class="paragraph"><p>The raw output format from "git-diff-index", "git-diff-tree", |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1860 | "git-diff-files" and "git diff --raw" are very similar.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1861 | <div class="paragraph"><p>These commands all compare two sets of things; what is |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1862 | compared differs:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1863 | <div class="dlist"><dl> |
| 1864 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1865 | git-diff-index <tree-ish> |
| 1866 | </dt> |
| 1867 | <dd> |
| 1868 | <p> |
| 1869 | compares the <tree-ish> and the files on the filesystem. |
| 1870 | </p> |
| 1871 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1872 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1873 | git-diff-index --cached <tree-ish> |
| 1874 | </dt> |
| 1875 | <dd> |
| 1876 | <p> |
| 1877 | compares the <tree-ish> and the index. |
| 1878 | </p> |
| 1879 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1880 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1881 | git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>…] |
| 1882 | </dt> |
| 1883 | <dd> |
| 1884 | <p> |
| 1885 | compares the trees named by the two arguments. |
| 1886 | </p> |
| 1887 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1888 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1889 | git-diff-files [<pattern>…] |
| 1890 | </dt> |
| 1891 | <dd> |
| 1892 | <p> |
| 1893 | compares the index and the files on the filesystem. |
| 1894 | </p> |
| 1895 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1896 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1897 | <div class="paragraph"><p>The "git-diff-tree" command begins its output by printing the hash of |
Junio C Hamano | 543f8d6 | 2009-07-29 08:35:21 | [diff] [blame] | 1898 | what is being compared. After that, all the commands print one output |
| 1899 | line per changed file.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1900 | <div class="paragraph"><p>An output line is formatted this way:</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1901 | <div class="listingblock"> |
| 1902 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1903 | <pre><code>in-place edit :100644 100644 bcd1234... 0123456... M file0 |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1904 | copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2 |
| 1905 | rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3 |
| 1906 | create :000000 100644 0000000... 1234567... A file4 |
| 1907 | delete :100644 000000 1234567... 0000000... D file5 |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1908 | unmerged :000000 000000 0000000... 0000000... U file6</code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1909 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1910 | <div class="paragraph"><p>That is, from the left to the right:</p></div> |
| 1911 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1912 | <li> |
| 1913 | <p> |
| 1914 | a colon. |
| 1915 | </p> |
| 1916 | </li> |
| 1917 | <li> |
| 1918 | <p> |
| 1919 | mode for "src"; 000000 if creation or unmerged. |
| 1920 | </p> |
| 1921 | </li> |
| 1922 | <li> |
| 1923 | <p> |
| 1924 | a space. |
| 1925 | </p> |
| 1926 | </li> |
| 1927 | <li> |
| 1928 | <p> |
| 1929 | mode for "dst"; 000000 if deletion or unmerged. |
| 1930 | </p> |
| 1931 | </li> |
| 1932 | <li> |
| 1933 | <p> |
| 1934 | a space. |
| 1935 | </p> |
| 1936 | </li> |
| 1937 | <li> |
| 1938 | <p> |
| 1939 | sha1 for "src"; 0{40} if creation or unmerged. |
| 1940 | </p> |
| 1941 | </li> |
| 1942 | <li> |
| 1943 | <p> |
| 1944 | a space. |
| 1945 | </p> |
| 1946 | </li> |
| 1947 | <li> |
| 1948 | <p> |
| 1949 | sha1 for "dst"; 0{40} if creation, unmerged or "look at work tree". |
| 1950 | </p> |
| 1951 | </li> |
| 1952 | <li> |
| 1953 | <p> |
| 1954 | a space. |
| 1955 | </p> |
| 1956 | </li> |
| 1957 | <li> |
| 1958 | <p> |
| 1959 | status, followed by optional "score" number. |
| 1960 | </p> |
| 1961 | </li> |
| 1962 | <li> |
| 1963 | <p> |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1964 | a tab or a NUL when <code>-z</code> option is used. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1965 | </p> |
| 1966 | </li> |
| 1967 | <li> |
| 1968 | <p> |
| 1969 | path for "src" |
| 1970 | </p> |
| 1971 | </li> |
| 1972 | <li> |
| 1973 | <p> |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1974 | a tab or a NUL when <code>-z</code> option is used; only exists for C or R. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1975 | </p> |
| 1976 | </li> |
| 1977 | <li> |
| 1978 | <p> |
| 1979 | path for "dst"; only exists for C or R. |
| 1980 | </p> |
| 1981 | </li> |
| 1982 | <li> |
| 1983 | <p> |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1984 | an LF or a NUL when <code>-z</code> option is used, to terminate the record. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1985 | </p> |
| 1986 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1987 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1988 | <div class="paragraph"><p>Possible status letters are:</p></div> |
| 1989 | <div class="ulist"><ul> |
Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 1990 | <li> |
| 1991 | <p> |
| 1992 | A: addition of a file |
| 1993 | </p> |
| 1994 | </li> |
| 1995 | <li> |
| 1996 | <p> |
| 1997 | C: copy of a file into a new one |
| 1998 | </p> |
| 1999 | </li> |
| 2000 | <li> |
| 2001 | <p> |
| 2002 | D: deletion of a file |
| 2003 | </p> |
| 2004 | </li> |
| 2005 | <li> |
| 2006 | <p> |
| 2007 | M: modification of the contents or mode of a file |
| 2008 | </p> |
| 2009 | </li> |
| 2010 | <li> |
| 2011 | <p> |
| 2012 | R: renaming of a file |
| 2013 | </p> |
| 2014 | </li> |
| 2015 | <li> |
| 2016 | <p> |
| 2017 | T: change in the type of the file |
| 2018 | </p> |
| 2019 | </li> |
| 2020 | <li> |
| 2021 | <p> |
| 2022 | U: file is unmerged (you must complete the merge before it can |
| 2023 | be committed) |
| 2024 | </p> |
| 2025 | </li> |
| 2026 | <li> |
| 2027 | <p> |
| 2028 | X: "unknown" change type (most probably a bug, please report it) |
| 2029 | </p> |
| 2030 | </li> |
| 2031 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2032 | <div class="paragraph"><p>Status letters C and R are always followed by a score (denoting the |
Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 2033 | percentage of similarity between the source and target of the move or |
Junio C Hamano | 6bb32e6 | 2015-02-17 22:11:26 | [diff] [blame] | 2034 | copy). Status letter M may be followed by a score (denoting the |
| 2035 | percentage of dissimilarity) for file rewrites.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2036 | <div class="paragraph"><p><sha1> is shown as all 0’s if a file is new on the filesystem |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2037 | and it is out of sync with the index.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2038 | <div class="paragraph"><p>Example:</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2039 | <div class="listingblock"> |
| 2040 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2041 | <pre><code>:100644 100644 5be4a4...... 000000...... M file.c</code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2042 | </div></div> |
Junio C Hamano | 0f6f3bf | 2017-03-13 07:01:53 | [diff] [blame] | 2043 | <div class="paragraph"><p>Without the <code>-z</code> option, pathnames with "unusual" characters are |
| 2044 | quoted as explained for the configuration variable <code>core.quotePath</code> |
| 2045 | (see <a href="git-config.html">git-config(1)</a>). Using <code>-z</code> the filename is output |
| 2046 | verbatim and the line is terminated by a NUL byte.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2047 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2048 | </div> |
| 2049 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2050 | <h2 id="_diff_format_for_merges">diff format for merges</h2> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 2051 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2052 | <div class="paragraph"><p>"git-diff-tree", "git-diff-files" and "git-diff --raw" |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 2053 | can take <code>-c</code> or <code>--cc</code> option |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 2054 | to generate diff output also for merge commits. The output differs |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2055 | from the format described above in the following way:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2056 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 2057 | <li> |
| 2058 | <p> |
| 2059 | there is a colon for each parent |
| 2060 | </p> |
| 2061 | </li> |
| 2062 | <li> |
| 2063 | <p> |
| 2064 | there are more "src" modes and "src" sha1 |
| 2065 | </p> |
| 2066 | </li> |
| 2067 | <li> |
| 2068 | <p> |
| 2069 | status is concatenated status characters for each parent |
| 2070 | </p> |
| 2071 | </li> |
| 2072 | <li> |
| 2073 | <p> |
| 2074 | no optional "score" number |
| 2075 | </p> |
| 2076 | </li> |
| 2077 | <li> |
| 2078 | <p> |
| 2079 | single path, only for "dst" |
| 2080 | </p> |
| 2081 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2082 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2083 | <div class="paragraph"><p>Example:</p></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 2084 | <div class="listingblock"> |
| 2085 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2086 | <pre><code>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</code></pre> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 2087 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2088 | <div class="paragraph"><p>Note that <em>combined diff</em> lists only files which were modified from |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2089 | all parents.</p></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 2090 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2091 | </div> |
| 2092 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2093 | <h2 id="_generating_patches_with_p">Generating patches with -p</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2094 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2095 | <div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 2096 | with a <code>-p</code> option, "git diff" without the <code>--raw</code> option, or |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 2097 | "git log" with the "-p" option, they |
Junio C Hamano | 7ae0ab2 | 2007-11-03 02:46:46 | [diff] [blame] | 2098 | do not produce the output described above; instead they produce a |
| 2099 | patch file. You can customize the creation of such patches via the |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 2100 | <code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2101 | <div class="paragraph"><p>What the -p option produces is slightly different from the traditional |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2102 | diff format:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2103 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2104 | <li> |
| 2105 | <p> |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2106 | It is preceded with a "git diff" header that looks like this: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2107 | </p> |
| 2108 | <div class="literalblock"> |
| 2109 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2110 | <pre><code>diff --git a/file1 b/file2</code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2111 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2112 | <div class="paragraph"><p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2113 | involved. Especially, even for a creation or a deletion, |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2114 | <code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div> |
| 2115 | <div class="paragraph"><p>When rename/copy is involved, <code>file1</code> and <code>file2</code> show the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2116 | name of the source file of the rename/copy and the name of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2117 | the file that rename/copy produces, respectively.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2118 | </li> |
| 2119 | <li> |
| 2120 | <p> |
| 2121 | It is followed by one or more extended header lines: |
| 2122 | </p> |
| 2123 | <div class="literalblock"> |
| 2124 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2125 | <pre><code>old mode <mode> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2126 | new mode <mode> |
| 2127 | deleted file mode <mode> |
| 2128 | new file mode <mode> |
| 2129 | copy from <path> |
| 2130 | copy to <path> |
| 2131 | rename from <path> |
| 2132 | rename to <path> |
| 2133 | similarity index <number> |
| 2134 | dissimilarity index <number> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2135 | index <hash>..<hash> <mode></code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2136 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2137 | <div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2138 | and file permission bits.</p></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2139 | <div class="paragraph"><p>Path names in extended headers do not include the <code>a/</code> and <code>b/</code> prefixes.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2140 | <div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2141 | the dissimilarity index is the percentage of changed lines. It |
| 2142 | is a rounded down integer, followed by a percent sign. The |
| 2143 | similarity index value of 100% is thus reserved for two equal |
| 2144 | files, while 100% dissimilarity means that no line from the old |
| 2145 | file made it into the new one.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2146 | <div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change. |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2147 | The <mode> is included if the file mode does not change; otherwise, |
| 2148 | separate lines indicate the old and the new mode.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2149 | </li> |
| 2150 | <li> |
| 2151 | <p> |
Junio C Hamano | 0f6f3bf | 2017-03-13 07:01:53 | [diff] [blame] | 2152 | Pathnames with "unusual" characters are quoted as explained for |
| 2153 | the configuration variable <code>core.quotePath</code> (see |
| 2154 | <a href="git-config.html">git-config(1)</a>). |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2155 | </p> |
| 2156 | </li> |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2157 | <li> |
| 2158 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2159 | All the <code>file1</code> files in the output refer to files before the |
| 2160 | commit, and all the <code>file2</code> files refer to files after the commit. |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2161 | It is incorrect to apply each change to each file sequentially. For |
| 2162 | example, this patch will swap a and b: |
| 2163 | </p> |
| 2164 | <div class="literalblock"> |
| 2165 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2166 | <pre><code>diff --git a/a b/b |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2167 | rename from a |
| 2168 | rename to b |
| 2169 | diff --git a/b b/a |
| 2170 | rename from b |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2171 | rename to a</code></pre> |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 2172 | </div></div> |
| 2173 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2174 | </ol></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2175 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2176 | </div> |
| 2177 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2178 | <h2 id="_combined_diff_format">combined diff format</h2> |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2179 | <div class="sectionbody"> |
Junio C Hamano | 1dbca52 | 2015-05-22 20:48:55 | [diff] [blame] | 2180 | <div class="paragraph"><p>Any diff-generating command can take the <code>-c</code> or <code>--cc</code> option to |
Junio C Hamano | c5be4cc | 2011-03-09 07:20:43 | [diff] [blame] | 2181 | produce a <em>combined diff</em> when showing a merge. This is the default |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2182 | format when showing merges with <a href="git-diff.html">git-diff(1)</a> or |
Junio C Hamano | 1dbca52 | 2015-05-22 20:48:55 | [diff] [blame] | 2183 | <a href="git-show.html">git-show(1)</a>. Note also that you can give the <code>-m</code> option to any |
Junio C Hamano | c5be4cc | 2011-03-09 07:20:43 | [diff] [blame] | 2184 | of these commands to force generation of diffs with individual parents |
| 2185 | of a merge.</p></div> |
| 2186 | <div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div> |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2187 | <div class="listingblock"> |
| 2188 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2189 | <pre><code>diff --combined describe.c |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2190 | index fabadb8,cc95eb0..4866510 |
| 2191 | --- a/describe.c |
| 2192 | +++ b/describe.c |
| 2193 | @@@ -98,20 -98,12 +98,20 @@@ |
| 2194 | return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1; |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2195 | } |
| 2196 | |
| 2197 | - static void describe(char *arg) |
| 2198 | -static void describe(struct commit *cmit, int last_one) |
| 2199 | ++static void describe(char *arg, int last_one) |
| 2200 | { |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2201 | + unsigned char sha1[20]; |
| 2202 | + struct commit *cmit; |
| 2203 | struct commit_list *list; |
| 2204 | static int initialized = 0; |
| 2205 | struct commit_name *n; |
| 2206 | |
| 2207 | + if (get_sha1(arg, sha1) < 0) |
| 2208 | + usage(describe_usage); |
| 2209 | + cmit = lookup_commit_reference(sha1); |
| 2210 | + if (!cmit) |
| 2211 | + usage(describe_usage); |
| 2212 | + |
| 2213 | if (!initialized) { |
| 2214 | initialized = 1; |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2215 | for_each_ref(get_name);</code></pre> |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2216 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2217 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2218 | <li> |
| 2219 | <p> |
| 2220 | It is preceded with a "git diff" header, that looks like |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 2221 | this (when <code>-c</code> option is used): |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2222 | </p> |
| 2223 | <div class="literalblock"> |
| 2224 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2225 | <pre><code>diff --combined file</code></pre> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2226 | </div></div> |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 2227 | <div class="paragraph"><p>or like this (when <code>--cc</code> option is used):</p></div> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2228 | <div class="literalblock"> |
| 2229 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2230 | <pre><code>diff --cc file</code></pre> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2231 | </div></div> |
| 2232 | </li> |
| 2233 | <li> |
| 2234 | <p> |
| 2235 | It is followed by one or more extended header lines |
| 2236 | (this example shows a merge with two parents): |
| 2237 | </p> |
| 2238 | <div class="literalblock"> |
| 2239 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2240 | <pre><code>index <hash>,<hash>..<hash> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2241 | mode <mode>,<mode>..<mode> |
| 2242 | new file mode <mode> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2243 | deleted file mode <mode>,<mode></code></pre> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2244 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2245 | <div class="paragraph"><p>The <code>mode <mode>,<mode>..<mode></code> line appears only if at least one of |
Junio C Hamano | ee1e428 | 2007-02-04 08:32:04 | [diff] [blame] | 2246 | the <mode> is different from the rest. Extended headers with |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2247 | information about detected contents movement (renames and |
| 2248 | copying detection) are designed to work with diff of two |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2249 | <tree-ish> and are not used by combined diff format.</p></div> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2250 | </li> |
| 2251 | <li> |
| 2252 | <p> |
| 2253 | It is followed by two-line from-file/to-file header |
| 2254 | </p> |
| 2255 | <div class="literalblock"> |
| 2256 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2257 | <pre><code>--- a/file |
| 2258 | +++ b/file</code></pre> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2259 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2260 | <div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2261 | format, <code>/dev/null</code> is used to signal created or deleted |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2262 | files.</p></div> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2263 | </li> |
| 2264 | <li> |
| 2265 | <p> |
| 2266 | Chunk header format is modified to prevent people from |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2267 | accidentally feeding it to <code>patch -p1</code>. Combined diff format |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2268 | was created for review of merge commit changes, and was not |
| 2269 | meant for apply. The change is similar to the change in the |
| 2270 | extended <em>index</em> header: |
| 2271 | </p> |
| 2272 | <div class="literalblock"> |
| 2273 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2274 | <pre><code>@@@ <from-file-range> <from-file-range> <to-file-range> @@@</code></pre> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2275 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2276 | <div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2277 | header for combined diff format.</p></div> |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2278 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2279 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2280 | <div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2281 | files A and B with a single column that has <code>-</code> (minus — appears in A but removed in B), <code>+</code> (plus — missing in A but |
| 2282 | added to B), or <code>" "</code> (space — unchanged) prefix, this format |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2283 | compares two or more files file1, file2,… with one file X, and |
| 2284 | shows how X differs from each of fileN. One column for each of |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2285 | fileN is prepended to the output line to note how X’s line is |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2286 | different from it.</p></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2287 | <div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in |
| 2288 | fileN but it does not appear in the result. A <code>+</code> character |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 2289 | in the column N means that the line appears in the result, |
Junio C Hamano | 29f1431 | 2006-10-26 08:47:29 | [diff] [blame] | 2290 | and fileN does not have that line (in other words, the line was |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2291 | added, from the point of view of that parent).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2292 | <div class="paragraph"><p>In the above example output, the function signature was changed |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2293 | from both files (hence two <code>-</code> removals from both file1 and |
| 2294 | file2, plus <code>++</code> to mean one line that was added does not appear |
Junio C Hamano | d75148a | 2014-04-08 19:48:38 | [diff] [blame] | 2295 | in either file1 or file2). Also eight other lines are the same |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2296 | from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div> |
| 2297 | <div class="paragraph"><p>When shown by <code>git diff-tree -c</code>, it compares the parents of a |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2298 | merge commit with the merge result (i.e. file1..fileN are the |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2299 | parents). When shown by <code>git diff-files -c</code>, it compares the |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2300 | two unresolved merge parents with the working tree file |
| 2301 | (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2302 | "their version").</p></div> |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 2303 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2304 | </div> |
| 2305 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2306 | <h2 id="_other_diff_formats">other diff formats</h2> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2307 | <div class="sectionbody"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2308 | <div class="paragraph"><p>The <code>--summary</code> option describes newly added, deleted, renamed and |
| 2309 | copied files. The <code>--stat</code> option adds diffstat(1) graph to the |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2310 | output. These options can be combined with other options, such as |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2311 | <code>-p</code>, and are meant for human consumption.</p></div> |
| 2312 | <div class="paragraph"><p>When showing a change that involves a rename or a copy, <code>--stat</code> output |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2313 | formats the pathnames compactly by combining common prefix and suffix of |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2314 | the pathnames. For example, a change that moves <code>arch/i386/Makefile</code> to |
| 2315 | <code>arch/x86/Makefile</code> while modifying 4 lines will be shown like this:</p></div> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2316 | <div class="listingblock"> |
| 2317 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2318 | <pre><code>arch/{i386 => x86}/Makefile | 4 +--</code></pre> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2319 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2320 | <div class="paragraph"><p>The <code>--numstat</code> option gives the diffstat(1) information but is designed |
| 2321 | for easier machine consumption. An entry in <code>--numstat</code> output looks |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2322 | like this:</p></div> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2323 | <div class="listingblock"> |
| 2324 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2325 | <pre><code>1 2 README |
| 2326 | 3 1 arch/{i386 => x86}/Makefile</code></pre> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2327 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2328 | <div class="paragraph"><p>That is, from left to right:</p></div> |
| 2329 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2330 | <li> |
| 2331 | <p> |
| 2332 | the number of added lines; |
| 2333 | </p> |
| 2334 | </li> |
| 2335 | <li> |
| 2336 | <p> |
| 2337 | a tab; |
| 2338 | </p> |
| 2339 | </li> |
| 2340 | <li> |
| 2341 | <p> |
| 2342 | the number of deleted lines; |
| 2343 | </p> |
| 2344 | </li> |
| 2345 | <li> |
| 2346 | <p> |
| 2347 | a tab; |
| 2348 | </p> |
| 2349 | </li> |
| 2350 | <li> |
| 2351 | <p> |
| 2352 | pathname (possibly with rename/copy information); |
| 2353 | </p> |
| 2354 | </li> |
| 2355 | <li> |
| 2356 | <p> |
| 2357 | a newline. |
| 2358 | </p> |
| 2359 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2360 | </ol></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2361 | <div class="paragraph"><p>When <code>-z</code> output option is in effect, the output is formatted this way:</p></div> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2362 | <div class="listingblock"> |
| 2363 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2364 | <pre><code>1 2 README NUL |
| 2365 | 3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL</code></pre> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2366 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2367 | <div class="paragraph"><p>That is:</p></div> |
| 2368 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2369 | <li> |
| 2370 | <p> |
| 2371 | the number of added lines; |
| 2372 | </p> |
| 2373 | </li> |
| 2374 | <li> |
| 2375 | <p> |
| 2376 | a tab; |
| 2377 | </p> |
| 2378 | </li> |
| 2379 | <li> |
| 2380 | <p> |
| 2381 | the number of deleted lines; |
| 2382 | </p> |
| 2383 | </li> |
| 2384 | <li> |
| 2385 | <p> |
| 2386 | a tab; |
| 2387 | </p> |
| 2388 | </li> |
| 2389 | <li> |
| 2390 | <p> |
| 2391 | a NUL (only exists if renamed/copied); |
| 2392 | </p> |
| 2393 | </li> |
| 2394 | <li> |
| 2395 | <p> |
| 2396 | pathname in preimage; |
| 2397 | </p> |
| 2398 | </li> |
| 2399 | <li> |
| 2400 | <p> |
| 2401 | a NUL (only exists if renamed/copied); |
| 2402 | </p> |
| 2403 | </li> |
| 2404 | <li> |
| 2405 | <p> |
| 2406 | pathname in postimage (only exists if renamed/copied); |
| 2407 | </p> |
| 2408 | </li> |
| 2409 | <li> |
| 2410 | <p> |
| 2411 | a NUL. |
| 2412 | </p> |
| 2413 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2414 | </ol></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2415 | <div class="paragraph"><p>The extra <code>NUL</code> before the preimage path in renamed case is to allow |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2416 | scripts that read the output to tell if the current record being read is |
| 2417 | a single-path record or a rename/copy record without reading ahead. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 2418 | After reading added and deleted lines, reading up to <code>NUL</code> would yield |
| 2419 | the pathname, but if that is <code>NUL</code>, the record will show two paths.</p></div> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 2420 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2421 | </div> |
| 2422 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2423 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2424 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2425 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2426 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2427 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2428 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2429 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2430 | <div id="footer"> |
| 2431 | <div id="footer-text"> |
Junio C Hamano | 7e5712f | 2017-10-05 05:53:13 | [diff] [blame] | 2432 | Last updated 2013-08-21 00:40:27 JST |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2433 | </div> |
| 2434 | </div> |
| 2435 | </body> |
| 2436 | </html> |