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