Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
| 6 | <meta name="generator" content="AsciiDoc 8.6.8" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 7 | <title>git-format-patch(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 37 | |
| 38 | em { |
| 39 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 40 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 45 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 46 | } |
| 47 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 55 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | padding-top: 0.5em; |
| 60 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 89 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 98 | |
| 99 | #author { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 100 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 101 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 102 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 103 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 104 | #email { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 105 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 106 | #revnumber, #revdate, #revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 107 | } |
| 108 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 109 | #footer { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 110 | font-size: small; |
| 111 | border-top: 2px solid silver; |
| 112 | padding-top: 0.5em; |
| 113 | margin-top: 4.0em; |
| 114 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 115 | #footer-text { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 116 | float: left; |
| 117 | padding-bottom: 0.5em; |
| 118 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 119 | #footer-badges { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 120 | float: right; |
| 121 | padding-bottom: 0.5em; |
| 122 | } |
| 123 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 124 | #preamble { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 125 | margin-top: 1.5em; |
| 126 | margin-bottom: 1.5em; |
| 127 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 128 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 129 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 130 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 131 | margin-top: 1.0em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 132 | margin-bottom: 1.5em; |
| 133 | } |
| 134 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 135 | margin-top: 2.0em; |
| 136 | margin-bottom: 2.0em; |
| 137 | margin-right: 10%; |
| 138 | color: #606060; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | div.content { /* Block element content. */ |
| 142 | padding: 0; |
| 143 | } |
| 144 | |
| 145 | /* Block element titles. */ |
| 146 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 147 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 148 | font-weight: bold; |
| 149 | text-align: left; |
| 150 | margin-top: 1.0em; |
| 151 | margin-bottom: 0.5em; |
| 152 | } |
| 153 | div.title + * { |
| 154 | margin-top: 0; |
| 155 | } |
| 156 | |
| 157 | td div.title:first-child { |
| 158 | margin-top: 0.0em; |
| 159 | } |
| 160 | div.content div.title:first-child { |
| 161 | margin-top: 0.0em; |
| 162 | } |
| 163 | div.content + div.title { |
| 164 | margin-top: 0.0em; |
| 165 | } |
| 166 | |
| 167 | div.sidebarblock > div.content { |
| 168 | background: #ffffee; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 169 | border: 1px solid #dddddd; |
| 170 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | padding: 0.5em; |
| 172 | } |
| 173 | |
| 174 | div.listingblock > div.content { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 175 | border: 1px solid #dddddd; |
| 176 | border-left: 5px solid #f0f0f0; |
| 177 | background: #f8f8f8; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 178 | padding: 0.5em; |
| 179 | } |
| 180 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 181 | div.quoteblock, div.verseblock { |
| 182 | padding-left: 1.0em; |
| 183 | margin-left: 1.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 184 | margin-right: 10%; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 185 | border-left: 5px solid #f0f0f0; |
| 186 | color: #888; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 187 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 188 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 189 | div.quoteblock > div.attribution { |
| 190 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 191 | text-align: right; |
| 192 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 193 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 194 | div.verseblock > pre.content { |
| 195 | font-family: inherit; |
| 196 | font-size: inherit; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 197 | } |
| 198 | div.verseblock > div.attribution { |
| 199 | padding-top: 0.75em; |
| 200 | text-align: left; |
| 201 | } |
| 202 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 203 | div.verseblock + div.attribution { |
| 204 | text-align: left; |
| 205 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 206 | |
| 207 | div.admonitionblock .icon { |
| 208 | vertical-align: top; |
| 209 | font-size: 1.1em; |
| 210 | font-weight: bold; |
| 211 | text-decoration: underline; |
| 212 | color: #527bbd; |
| 213 | padding-right: 0.5em; |
| 214 | } |
| 215 | div.admonitionblock td.content { |
| 216 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 217 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 221 | border-left: 3px solid #dddddd; |
| 222 | padding-left: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 223 | } |
| 224 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 225 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 226 | span.image img { border-style: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 227 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 228 | |
| 229 | dl { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| 233 | dt { |
| 234 | margin-top: 0.5em; |
| 235 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 236 | font-style: normal; |
| 237 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 238 | } |
| 239 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 240 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | ul, ol { |
| 244 | list-style-position: outside; |
| 245 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 246 | ol.arabic { |
| 247 | list-style-type: decimal; |
| 248 | } |
| 249 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 250 | list-style-type: lower-alpha; |
| 251 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 252 | ol.upperalpha { |
| 253 | list-style-type: upper-alpha; |
| 254 | } |
| 255 | ol.lowerroman { |
| 256 | list-style-type: lower-roman; |
| 257 | } |
| 258 | ol.upperroman { |
| 259 | list-style-type: upper-roman; |
| 260 | } |
| 261 | |
| 262 | div.compact ul, div.compact ol, |
| 263 | div.compact p, div.compact p, |
| 264 | div.compact div, div.compact div { |
| 265 | margin-top: 0.1em; |
| 266 | margin-bottom: 0.1em; |
| 267 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 268 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 269 | tfoot { |
| 270 | font-weight: bold; |
| 271 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 272 | td > div.verse { |
| 273 | white-space: pre; |
| 274 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 275 | |
| 276 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 277 | margin-top: 0.8em; |
| 278 | margin-bottom: 0.8em; |
| 279 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 280 | div.hdlist tr { |
| 281 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 282 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 283 | dt.hdlist1.strong, td.hdlist1.strong { |
| 284 | font-weight: bold; |
| 285 | } |
| 286 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 287 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 288 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 289 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 290 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 291 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 292 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 293 | vertical-align: top; |
| 294 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 295 | div.hdlist.compact tr { |
| 296 | margin: 0; |
| 297 | padding-bottom: 0; |
| 298 | } |
| 299 | |
| 300 | .comment { |
| 301 | background: yellow; |
| 302 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 303 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 304 | .footnote, .footnoteref { |
| 305 | font-size: 0.8em; |
| 306 | } |
| 307 | |
| 308 | span.footnote, span.footnoteref { |
| 309 | vertical-align: super; |
| 310 | } |
| 311 | |
| 312 | #footnotes { |
| 313 | margin: 20px 0 20px 0; |
| 314 | padding: 7px 0 0 0; |
| 315 | } |
| 316 | |
| 317 | #footnotes div.footnote { |
| 318 | margin: 0 0 5px 0; |
| 319 | } |
| 320 | |
| 321 | #footnotes hr { |
| 322 | border: none; |
| 323 | border-top: 1px solid silver; |
| 324 | height: 1px; |
| 325 | text-align: left; |
| 326 | margin-left: 0; |
| 327 | width: 20%; |
| 328 | min-width: 100px; |
| 329 | } |
| 330 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 331 | div.colist td { |
| 332 | padding-right: 0.5em; |
| 333 | padding-bottom: 0.3em; |
| 334 | vertical-align: top; |
| 335 | } |
| 336 | div.colist td img { |
| 337 | margin-top: 0.3em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 338 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 340 | @media print { |
| 341 | #footer-badges { display: none; } |
| 342 | } |
| 343 | |
| 344 | #toc { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 345 | margin-bottom: 2.5em; |
| 346 | } |
| 347 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 348 | #toctitle { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 349 | color: #527bbd; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 350 | font-size: 1.1em; |
| 351 | font-weight: bold; |
| 352 | margin-top: 1.0em; |
| 353 | margin-bottom: 0.1em; |
| 354 | } |
| 355 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 356 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 357 | margin-top: 0; |
| 358 | margin-bottom: 0; |
| 359 | } |
| 360 | div.toclevel2 { |
| 361 | margin-left: 2em; |
| 362 | font-size: 0.9em; |
| 363 | } |
| 364 | div.toclevel3 { |
| 365 | margin-left: 4em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel4 { |
| 369 | margin-left: 6em; |
| 370 | font-size: 0.9em; |
| 371 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 372 | |
| 373 | span.aqua { color: aqua; } |
| 374 | span.black { color: black; } |
| 375 | span.blue { color: blue; } |
| 376 | span.fuchsia { color: fuchsia; } |
| 377 | span.gray { color: gray; } |
| 378 | span.green { color: green; } |
| 379 | span.lime { color: lime; } |
| 380 | span.maroon { color: maroon; } |
| 381 | span.navy { color: navy; } |
| 382 | span.olive { color: olive; } |
| 383 | span.purple { color: purple; } |
| 384 | span.red { color: red; } |
| 385 | span.silver { color: silver; } |
| 386 | span.teal { color: teal; } |
| 387 | span.white { color: white; } |
| 388 | span.yellow { color: yellow; } |
| 389 | |
| 390 | span.aqua-background { background: aqua; } |
| 391 | span.black-background { background: black; } |
| 392 | span.blue-background { background: blue; } |
| 393 | span.fuchsia-background { background: fuchsia; } |
| 394 | span.gray-background { background: gray; } |
| 395 | span.green-background { background: green; } |
| 396 | span.lime-background { background: lime; } |
| 397 | span.maroon-background { background: maroon; } |
| 398 | span.navy-background { background: navy; } |
| 399 | span.olive-background { background: olive; } |
| 400 | span.purple-background { background: purple; } |
| 401 | span.red-background { background: red; } |
| 402 | span.silver-background { background: silver; } |
| 403 | span.teal-background { background: teal; } |
| 404 | span.white-background { background: white; } |
| 405 | span.yellow-background { background: yellow; } |
| 406 | |
| 407 | span.big { font-size: 2em; } |
| 408 | span.small { font-size: 0.6em; } |
| 409 | |
| 410 | span.underline { text-decoration: underline; } |
| 411 | span.overline { text-decoration: overline; } |
| 412 | span.line-through { text-decoration: line-through; } |
| 413 | |
| 414 | div.unbreakable { page-break-inside: avoid; } |
| 415 | |
| 416 | |
| 417 | /* |
| 418 | * xhtml11 specific |
| 419 | * |
| 420 | * */ |
| 421 | |
| 422 | div.tableblock { |
| 423 | margin-top: 1.0em; |
| 424 | margin-bottom: 1.5em; |
| 425 | } |
| 426 | div.tableblock > table { |
| 427 | border: 3px solid #527bbd; |
| 428 | } |
| 429 | thead, p.table.header { |
| 430 | font-weight: bold; |
| 431 | color: #527bbd; |
| 432 | } |
| 433 | p.table { |
| 434 | margin-top: 0; |
| 435 | } |
| 436 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 437 | div.tableblock > table[frame="void"] { |
| 438 | border-style: none; |
| 439 | } |
| 440 | div.tableblock > table[frame="hsides"] { |
| 441 | border-left-style: none; |
| 442 | border-right-style: none; |
| 443 | } |
| 444 | div.tableblock > table[frame="vsides"] { |
| 445 | border-top-style: none; |
| 446 | border-bottom-style: none; |
| 447 | } |
| 448 | |
| 449 | |
| 450 | /* |
| 451 | * html5 specific |
| 452 | * |
| 453 | * */ |
| 454 | |
| 455 | table.tableblock { |
| 456 | margin-top: 1.0em; |
| 457 | margin-bottom: 1.5em; |
| 458 | } |
| 459 | thead, p.tableblock.header { |
| 460 | font-weight: bold; |
| 461 | color: #527bbd; |
| 462 | } |
| 463 | p.tableblock { |
| 464 | margin-top: 0; |
| 465 | } |
| 466 | table.tableblock { |
| 467 | border-width: 3px; |
| 468 | border-spacing: 0px; |
| 469 | border-style: solid; |
| 470 | border-color: #527bbd; |
| 471 | border-collapse: collapse; |
| 472 | } |
| 473 | th.tableblock, td.tableblock { |
| 474 | border-width: 1px; |
| 475 | padding: 4px; |
| 476 | border-style: solid; |
| 477 | border-color: #527bbd; |
| 478 | } |
| 479 | |
| 480 | table.tableblock.frame-topbot { |
| 481 | border-left-style: hidden; |
| 482 | border-right-style: hidden; |
| 483 | } |
| 484 | table.tableblock.frame-sides { |
| 485 | border-top-style: hidden; |
| 486 | border-bottom-style: hidden; |
| 487 | } |
| 488 | table.tableblock.frame-none { |
| 489 | border-style: hidden; |
| 490 | } |
| 491 | |
| 492 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 493 | text-align: left; |
| 494 | } |
| 495 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 496 | text-align: center; |
| 497 | } |
| 498 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 499 | text-align: right; |
| 500 | } |
| 501 | |
| 502 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 503 | vertical-align: top; |
| 504 | } |
| 505 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 506 | vertical-align: middle; |
| 507 | } |
| 508 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 509 | vertical-align: bottom; |
| 510 | } |
| 511 | |
| 512 | |
| 513 | /* |
| 514 | * manpage specific |
| 515 | * |
| 516 | * */ |
| 517 | |
| 518 | body.manpage h1 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 519 | padding-top: 0.5em; |
| 520 | padding-bottom: 0.5em; |
| 521 | border-top: 2px solid silver; |
| 522 | border-bottom: 2px solid silver; |
| 523 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 524 | body.manpage h2 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 525 | border-style: none; |
| 526 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 527 | body.manpage div.sectionbody { |
| 528 | margin-left: 3em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 529 | } |
| 530 | |
| 531 | @media print { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 532 | body.manpage div#toc { display: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 533 | } |
| 534 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 535 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 536 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 537 | <script type="text/javascript"> |
| 538 | /*<![CDATA[*/ |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 539 | var asciidoc = { // Namespace. |
| 540 | |
| 541 | ///////////////////////////////////////////////////////////////////// |
| 542 | // Table Of Contents generator |
| 543 | ///////////////////////////////////////////////////////////////////// |
| 544 | |
| 545 | /* Author: Mihai Bazon, September 2002 |
| 546 | * http://students.infoiasi.ro/~mishoo |
| 547 | * |
| 548 | * Table Of Content generator |
| 549 | * Version: 0.4 |
| 550 | * |
| 551 | * Feel free to use this script under the terms of the GNU General Public |
| 552 | * License, as long as you do not remove or alter this notice. |
| 553 | */ |
| 554 | |
| 555 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 556 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 557 | |
| 558 | // toclevels = 1..4. |
| 559 | toc: function (toclevels) { |
| 560 | |
| 561 | function getText(el) { |
| 562 | var text = ""; |
| 563 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 564 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 565 | text += i.data; |
| 566 | else if (i.firstChild != null) |
| 567 | text += getText(i); |
| 568 | } |
| 569 | return text; |
| 570 | } |
| 571 | |
| 572 | function TocEntry(el, text, toclevel) { |
| 573 | this.element = el; |
| 574 | this.text = text; |
| 575 | this.toclevel = toclevel; |
| 576 | } |
| 577 | |
| 578 | function tocEntries(el, toclevels) { |
| 579 | var result = new Array; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 580 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 581 | // Function that scans the DOM tree for header elements (the DOM2 |
| 582 | // nodeIterator API would be a better technique but not supported by all |
| 583 | // browsers). |
| 584 | var iterate = function (el) { |
| 585 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 586 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 587 | var mo = re.exec(i.tagName); |
| 588 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 589 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 590 | } |
| 591 | iterate(i); |
| 592 | } |
| 593 | } |
| 594 | } |
| 595 | iterate(el); |
| 596 | return result; |
| 597 | } |
| 598 | |
| 599 | var toc = document.getElementById("toc"); |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 600 | if (!toc) { |
| 601 | return; |
| 602 | } |
| 603 | |
| 604 | // Delete existing TOC entries in case we're reloading the TOC. |
| 605 | var tocEntriesToRemove = []; |
| 606 | var i; |
| 607 | for (i = 0; i < toc.childNodes.length; i++) { |
| 608 | var entry = toc.childNodes[i]; |
| 609 | if (entry.nodeName.toLowerCase() == 'div' |
| 610 | && entry.getAttribute("class") |
| 611 | && entry.getAttribute("class").match(/^toclevel/)) |
| 612 | tocEntriesToRemove.push(entry); |
| 613 | } |
| 614 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 615 | toc.removeChild(tocEntriesToRemove[i]); |
| 616 | } |
| 617 | |
| 618 | // Rebuild TOC entries. |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 619 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 620 | for (var i = 0; i < entries.length; ++i) { |
| 621 | var entry = entries[i]; |
| 622 | if (entry.element.id == "") |
| 623 | entry.element.id = "_toc_" + i; |
| 624 | var a = document.createElement("a"); |
| 625 | a.href = "#" + entry.element.id; |
| 626 | a.appendChild(document.createTextNode(entry.text)); |
| 627 | var div = document.createElement("div"); |
| 628 | div.appendChild(a); |
| 629 | div.className = "toclevel" + entry.toclevel; |
| 630 | toc.appendChild(div); |
| 631 | } |
| 632 | if (entries.length == 0) |
| 633 | toc.parentNode.removeChild(toc); |
| 634 | }, |
| 635 | |
| 636 | |
| 637 | ///////////////////////////////////////////////////////////////////// |
| 638 | // Footnotes generator |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | |
| 641 | /* Based on footnote generation code from: |
| 642 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 643 | */ |
| 644 | |
| 645 | footnotes: function () { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 646 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 647 | var i; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 648 | var noteholder = document.getElementById("footnotes"); |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 649 | if (!noteholder) { |
| 650 | return; |
| 651 | } |
| 652 | var entriesToRemove = []; |
| 653 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 654 | var entry = noteholder.childNodes[i]; |
| 655 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
| 656 | entriesToRemove.push(entry); |
| 657 | } |
| 658 | for (i = 0; i < entriesToRemove.length; i++) { |
| 659 | noteholder.removeChild(entriesToRemove[i]); |
| 660 | } |
| 661 | |
| 662 | // Rebuild footnote entries. |
| 663 | var cont = document.getElementById("content"); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 664 | var spans = cont.getElementsByTagName("span"); |
| 665 | var refs = {}; |
| 666 | var n = 0; |
| 667 | for (i=0; i<spans.length; i++) { |
| 668 | if (spans[i].className == "footnote") { |
| 669 | n++; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 670 | var note = spans[i].getAttribute("data-note"); |
| 671 | if (!note) { |
| 672 | // Use [\s\S] in place of . so multi-line matches work. |
| 673 | // Because JavaScript has no s (dotall) regex flag. |
| 674 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 675 | spans[i].innerHTML = |
| 676 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 677 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 678 | spans[i].setAttribute("data-note", note); |
| 679 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 680 | noteholder.innerHTML += |
| 681 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 682 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 683 | n + "</a>. " + note + "</div>"; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 684 | var id =spans[i].getAttribute("id"); |
| 685 | if (id != null) refs["#"+id] = n; |
| 686 | } |
| 687 | } |
| 688 | if (n == 0) |
| 689 | noteholder.parentNode.removeChild(noteholder); |
| 690 | else { |
| 691 | // Process footnoterefs. |
| 692 | for (i=0; i<spans.length; i++) { |
| 693 | if (spans[i].className == "footnoteref") { |
| 694 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 695 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 696 | n = refs[href]; |
| 697 | spans[i].innerHTML = |
| 698 | "[<a href='#_footnote_" + n + |
| 699 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 700 | } |
| 701 | } |
| 702 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 703 | }, |
| 704 | |
| 705 | install: function(toclevels) { |
| 706 | var timerId; |
| 707 | |
| 708 | function reinstall() { |
| 709 | asciidoc.footnotes(); |
| 710 | if (toclevels) { |
| 711 | asciidoc.toc(toclevels); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | function reinstallAndRemoveTimer() { |
| 716 | clearInterval(timerId); |
| 717 | reinstall(); |
| 718 | } |
| 719 | |
| 720 | timerId = setInterval(reinstall, 500); |
| 721 | if (document.addEventListener) |
| 722 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 723 | else |
| 724 | window.onload = reinstallAndRemoveTimer; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 725 | } |
| 726 | |
| 727 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 728 | asciidoc.install(); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 729 | /*]]>*/ |
| 730 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 731 | </head> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 732 | <body class="manpage"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 733 | <div id="header"> |
| 734 | <h1> |
| 735 | git-format-patch(1) Manual Page |
| 736 | </h1> |
| 737 | <h2>NAME</h2> |
| 738 | <div class="sectionbody"> |
| 739 | <p>git-format-patch - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 740 | Prepare patches for e-mail submission |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 741 | </p> |
| 742 | </div> |
| 743 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 744 | <div id="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 745 | <div class="sect1"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 746 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 747 | <div class="sectionbody"> |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 748 | <div class="verseblock"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 749 | <pre class="content"><em>git format-patch</em> [-k] [(-o|--output-directory) <dir> | --stdout] |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 750 | [--no-thread | --thread[=<style>]] |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 751 | [(--attach|--inline)[=<boundary>] | --no-attach] |
| 752 | [-s | --signoff] |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 753 | [--signature=<signature> | --no-signature] |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 754 | [-n | --numbered | -N | --no-numbered] |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 755 | [--start-number <n>] [--numbered-files] |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 756 | [--in-reply-to=Message-Id] [--suffix=.<sfx>] |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 757 | [--ignore-if-in-upstream] |
Junio C Hamano | 7dac690 | 2013-01-12 08:25:31 | [diff] [blame] | 758 | [--subject-prefix=Subject-Prefix] [(--reroll-count|-v) <n>] |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 759 | [--to=<email>] [--cc=<email>] |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 760 | [--cover-letter] [--quiet] [--notes[=<ref>]] |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 761 | [<common diff options>] |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 762 | [ <since> | <revision range> ]</pre> |
| 763 | <div class="attribution"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 764 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 765 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 766 | </div> |
| 767 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 768 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 769 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 770 | <div class="paragraph"><p>Prepare each commit with its patch in |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 771 | one file per commit, formatted to resemble UNIX mailbox format. |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 772 | The output of this command is convenient for e-mail submission or |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 773 | for use with <em>git am</em>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 774 | <div class="paragraph"><p>There are two ways to specify which commits to operate on.</p></div> |
| 775 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 776 | <li> |
| 777 | <p> |
| 778 | A single commit, <since>, specifies that the commits leading |
| 779 | to the tip of the current branch that are not in the history |
| 780 | that leads to the <since> to be output. |
| 781 | </p> |
| 782 | </li> |
| 783 | <li> |
| 784 | <p> |
| 785 | Generic <revision range> expression (see "SPECIFYING |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 786 | REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>) means the |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 787 | commits in the specified range. |
| 788 | </p> |
| 789 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 790 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 791 | <div class="paragraph"><p>The first rule takes precedence in the case of a single <commit>. To |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 792 | apply the second rule, i.e., format everything since the beginning of |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 793 | history up until <commit>, use the <em>--root</em> option: <code>git format-patch |
| 794 | --root <commit></code>. If you want to format only <commit> itself, you |
| 795 | can do this with <code>git format-patch -1 <commit></code>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 796 | <div class="paragraph"><p>By default, each output file is numbered sequentially from 1, and uses the |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 797 | first line of the commit message (massaged for pathname safety) as |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 798 | the filename. With the <code>--numbered-files</code> option, the output file names |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 799 | will only be numbers, without the first line of the commit appended. |
| 800 | The names of the output files are printed to standard |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 801 | output, unless the <code>--stdout</code> option is specified.</p></div> |
| 802 | <div class="paragraph"><p>If <code>-o</code> is specified, output files are created in <dir>. Otherwise |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 803 | they are created in the current working directory.</p></div> |
Junio C Hamano | 281fd39 | 2012-09-17 23:57:41 | [diff] [blame] | 804 | <div class="paragraph"><p>By default, the subject of a single patch is "[PATCH] " followed by |
| 805 | the concatenation of lines from the commit message up to the first blank |
| 806 | line (see the DISCUSSION section of <a href="git-commit.html">git-commit(1)</a>).</p></div> |
| 807 | <div class="paragraph"><p>When multiple patches are output, the subject prefix will instead be |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 808 | "[PATCH n/m] ". To force 1/1 to be added for a single patch, use <code>-n</code>. |
| 809 | To omit patch numbers from the subject, use <code>-N</code>.</p></div> |
| 810 | <div class="paragraph"><p>If given <code>--thread</code>, <code>git-format-patch</code> will generate <code>In-Reply-To</code> and |
| 811 | <code>References</code> headers to make the second and subsequent patch mails appear |
| 812 | as replies to the first mail; this also generates a <code>Message-Id</code> header to |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 813 | reference.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 814 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 815 | </div> |
| 816 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 817 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 818 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 819 | <div class="dlist"><dl> |
| 820 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 821 | -p |
| 822 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 823 | <dt class="hdlist1"> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 824 | --no-stat |
| 825 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 826 | <dd> |
| 827 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 828 | Generate plain patches without any diffstats. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 829 | </p> |
| 830 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 831 | <dt class="hdlist1"> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 832 | -U<n> |
| 833 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 834 | <dt class="hdlist1"> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 835 | --unified=<n> |
| 836 | </dt> |
| 837 | <dd> |
| 838 | <p> |
| 839 | Generate diffs with <n> lines of context instead of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 840 | the usual three. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 841 | </p> |
| 842 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 843 | <dt class="hdlist1"> |
Junio C Hamano | 5a73f30 | 2011-10-14 05:58:34 | [diff] [blame] | 844 | --minimal |
| 845 | </dt> |
| 846 | <dd> |
| 847 | <p> |
| 848 | Spend extra time to make sure the smallest possible |
| 849 | diff is produced. |
| 850 | </p> |
| 851 | </dd> |
| 852 | <dt class="hdlist1"> |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 853 | --patience |
| 854 | </dt> |
| 855 | <dd> |
| 856 | <p> |
| 857 | Generate a diff using the "patience diff" algorithm. |
| 858 | </p> |
| 859 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 860 | <dt class="hdlist1"> |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 861 | --histogram |
| 862 | </dt> |
| 863 | <dd> |
| 864 | <p> |
| 865 | Generate a diff using the "histogram diff" algorithm. |
| 866 | </p> |
| 867 | </dd> |
| 868 | <dt class="hdlist1"> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame^] | 869 | --diff-algorithm={patience|minimal|histogram|myers} |
| 870 | </dt> |
| 871 | <dd> |
| 872 | <p> |
| 873 | Choose a diff algorithm. The variants are as follows: |
| 874 | </p> |
| 875 | <div class="openblock"> |
| 876 | <div class="content"> |
| 877 | <div class="dlist"><dl> |
| 878 | <dt class="hdlist1"> |
| 879 | <code>default</code>, <code>myers</code> |
| 880 | </dt> |
| 881 | <dd> |
| 882 | <p> |
| 883 | The basic greedy diff algorithm. Currently, this is the default. |
| 884 | </p> |
| 885 | </dd> |
| 886 | <dt class="hdlist1"> |
| 887 | <code>minimal</code> |
| 888 | </dt> |
| 889 | <dd> |
| 890 | <p> |
| 891 | Spend extra time to make sure the smallest possible diff is |
| 892 | produced. |
| 893 | </p> |
| 894 | </dd> |
| 895 | <dt class="hdlist1"> |
| 896 | <code>patience</code> |
| 897 | </dt> |
| 898 | <dd> |
| 899 | <p> |
| 900 | Use "patience diff" algorithm when generating patches. |
| 901 | </p> |
| 902 | </dd> |
| 903 | <dt class="hdlist1"> |
| 904 | <code>histogram</code> |
| 905 | </dt> |
| 906 | <dd> |
| 907 | <p> |
| 908 | This algorithm extends the patience algorithm to "support |
| 909 | low-occurrence common elements". |
| 910 | </p> |
| 911 | </dd> |
| 912 | </dl></div> |
| 913 | </div></div> |
| 914 | <div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a |
| 915 | non-default value and want to use the default one, then you |
| 916 | have to use <code>--diff-algorithm=default</code> option.</p></div> |
| 917 | </dd> |
| 918 | <dt class="hdlist1"> |
Junio C Hamano | 4c4b012 | 2011-06-30 01:19:32 | [diff] [blame] | 919 | --stat[=<width>[,<name-width>[,<count>]]] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 920 | </dt> |
| 921 | <dd> |
| 922 | <p> |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 923 | Generate a diffstat. By default, as much space as necessary |
| 924 | will be used for the filename part, and the rest for the graph |
| 925 | part. Maximum width defaults to terminal width, or 80 columns |
Junio C Hamano | 7f2b3cb | 2012-06-22 22:42:39 | [diff] [blame] | 926 | if not connected to a terminal, and can be overridden by |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 927 | <code><width></code>. The width of the filename part can be limited by |
| 928 | giving another width <code><name-width></code> after a comma. The width |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 929 | of the graph part can be limited by using |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 930 | <code>--stat-graph-width=<width></code> (affects all commands generating |
| 931 | a stat graph) or by setting <code>diff.statGraphWidth=<width></code> |
| 932 | (does not affect <code>git format-patch</code>). |
| 933 | By giving a third parameter <code><count></code>, you can limit the |
| 934 | 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] | 935 | there are more. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 936 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 937 | <div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=<width></code>, |
| 938 | <code>--stat-name-width=<name-width></code> and <code>--stat-count=<count></code>.</p></div> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 939 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 940 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 941 | --numstat |
| 942 | </dt> |
| 943 | <dd> |
| 944 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 945 | Similar to <code>--stat</code>, but shows number of added and |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 946 | deleted lines in decimal notation and pathname without |
| 947 | abbreviation, to make it more machine friendly. For |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 948 | binary files, outputs two <code>-</code> instead of saying |
| 949 | <code>0 0</code>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 950 | </p> |
| 951 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 952 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 953 | --shortstat |
| 954 | </dt> |
| 955 | <dd> |
| 956 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 957 | Output only the last line of the <code>--stat</code> format containing total |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 958 | number of modified files, as well as number of added and deleted |
| 959 | lines. |
| 960 | </p> |
| 961 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 962 | <dt class="hdlist1"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 963 | --dirstat[=<param1,param2,…>] |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 964 | </dt> |
| 965 | <dd> |
| 966 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 967 | Output the distribution of relative amount of changes for each |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 968 | sub-directory. The behavior of <code>--dirstat</code> can be customized by |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 969 | passing it a comma separated list of parameters. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 970 | The defaults are controlled by the <code>diff.dirstat</code> configuration |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 971 | variable (see <a href="git-config.html">git-config(1)</a>). |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 972 | The following parameters are available: |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 973 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 974 | <div class="openblock"> |
| 975 | <div class="content"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 976 | <div class="dlist"><dl> |
| 977 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 978 | <code>changes</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 979 | </dt> |
| 980 | <dd> |
| 981 | <p> |
| 982 | Compute the dirstat numbers by counting the lines that have been |
| 983 | removed from the source, or added to the destination. This ignores |
| 984 | the amount of pure code movements within a file. In other words, |
| 985 | rearranging lines in a file is not counted as much as other changes. |
| 986 | This is the default behavior when no parameter is given. |
| 987 | </p> |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 988 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 989 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 990 | <code>lines</code> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 991 | </dt> |
| 992 | <dd> |
| 993 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 994 | Compute the dirstat numbers by doing the regular line-based diff |
| 995 | analysis, and summing the removed/added line counts. (For binary |
| 996 | files, count 64-byte chunks instead, since binary files have no |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 997 | natural concept of lines). This is a more expensive <code>--dirstat</code> |
| 998 | behavior than the <code>changes</code> behavior, but it does count rearranged |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 999 | lines within a file as much as other changes. The resulting output |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1000 | 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] | 1001 | </p> |
| 1002 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1003 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1004 | <code>files</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1005 | </dt> |
| 1006 | <dd> |
| 1007 | <p> |
| 1008 | Compute the dirstat numbers by counting the number of files changed. |
| 1009 | Each changed file counts equally in the dirstat analysis. This is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1010 | the computationally cheapest <code>--dirstat</code> behavior, since it does |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1011 | not have to look at the file contents at all. |
| 1012 | </p> |
| 1013 | </dd> |
| 1014 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1015 | <code>cumulative</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1016 | </dt> |
| 1017 | <dd> |
| 1018 | <p> |
| 1019 | Count changes in a child directory for the parent directory as well. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1020 | Note that when using <code>cumulative</code>, the sum of the percentages |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1021 | reported may exceed 100%. The default (non-cumulative) behavior can |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1022 | be specified with the <code>noncumulative</code> parameter. |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1023 | </p> |
| 1024 | </dd> |
| 1025 | <dt class="hdlist1"> |
| 1026 | <limit> |
| 1027 | </dt> |
| 1028 | <dd> |
| 1029 | <p> |
| 1030 | An integer parameter specifies a cut-off percent (3% by default). |
| 1031 | Directories contributing less than this percentage of the changes |
| 1032 | are not shown in the output. |
| 1033 | </p> |
| 1034 | </dd> |
| 1035 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1036 | </div></div> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1037 | <div class="paragraph"><p>Example: The following will count changed files, while ignoring |
| 1038 | directories with less than 10% of the total amount of changed files, |
| 1039 | and accumulating child directory counts in the parent directories: |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1040 | <code>--dirstat=files,10,cumulative</code>.</p></div> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 1041 | </dd> |
| 1042 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1043 | --summary |
| 1044 | </dt> |
| 1045 | <dd> |
| 1046 | <p> |
| 1047 | Output a condensed summary of extended header information |
| 1048 | such as creations, renames and mode changes. |
| 1049 | </p> |
| 1050 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1051 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1052 | --no-renames |
| 1053 | </dt> |
| 1054 | <dd> |
| 1055 | <p> |
| 1056 | Turn off rename detection, even when the configuration |
| 1057 | file gives the default to do so. |
| 1058 | </p> |
| 1059 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1060 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1061 | --full-index |
| 1062 | </dt> |
| 1063 | <dd> |
| 1064 | <p> |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 1065 | Instead of the first handful of characters, show the full |
| 1066 | pre- and post-image blob object names on the "index" |
| 1067 | line when generating patch format output. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1068 | </p> |
| 1069 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1070 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1071 | --binary |
| 1072 | </dt> |
| 1073 | <dd> |
| 1074 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1075 | In addition to <code>--full-index</code>, output a binary diff that |
| 1076 | can be applied with <code>git-apply</code>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1077 | </p> |
| 1078 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1079 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1080 | --abbrev[=<n>] |
| 1081 | </dt> |
| 1082 | <dd> |
| 1083 | <p> |
| 1084 | Instead of showing the full 40-byte hexadecimal object |
| 1085 | name in diff-raw format output and diff-tree header |
Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 1086 | lines, show only a partial prefix. This is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1087 | independent of the <code>--full-index</code> option above, which controls |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1088 | the diff-patch output format. Non default number of |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1089 | digits can be specified with <code>--abbrev=<n></code>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1090 | </p> |
| 1091 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1092 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1093 | -B[<n>][/<m>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1094 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1095 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1096 | --break-rewrites[=[<n>][/<m>]] |
| 1097 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1098 | <dd> |
| 1099 | <p> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1100 | Break complete rewrite changes into pairs of delete and |
| 1101 | create. This serves two purposes: |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1102 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1103 | <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] | 1104 | not as a series of deletion and insertion mixed together with a very |
| 1105 | few lines that happen to match textually as the context, but as a |
| 1106 | single deletion of everything old followed by a single insertion of |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1107 | everything new, and the number <code>m</code> controls this aspect of the -B |
| 1108 | 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] | 1109 | 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] | 1110 | rewrite (i.e. otherwise the resulting patch will be a series of |
| 1111 | deletion and insertion mixed together with context lines).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1112 | <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] | 1113 | source of a rename (usually -M only considers a file that disappeared |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1114 | as the source of a rename), and the number <code>n</code> controls this aspect of |
| 1115 | 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] | 1116 | 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] | 1117 | eligible for being picked up as a possible source of a rename to |
| 1118 | another file.</p></div> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1119 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1120 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1121 | -M[<n>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1122 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1123 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1124 | --find-renames[=<n>] |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1125 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1126 | <dd> |
| 1127 | <p> |
| 1128 | Detect renames. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1129 | 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] | 1130 | index (i.e. amount of addition/deletions compared to the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1131 | 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] | 1132 | delete/add pair to be a rename if more than 90% of the file |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1133 | hasn’t changed. Without a <code>%</code> sign, the number is to be read as |
| 1134 | a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes |
| 1135 | 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is |
| 1136 | the same as <code>-M5%</code>. To limit detection to exact renames, use |
| 1137 | <code>-M100%</code>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1138 | </p> |
| 1139 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1140 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 1141 | -C[<n>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1142 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1143 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1144 | --find-copies[=<n>] |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1145 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1146 | <dd> |
| 1147 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1148 | Detect copies as well as renames. See also <code>--find-copies-harder</code>. |
| 1149 | If <code>n</code> is specified, it has the same meaning as for <code>-M<n></code>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1150 | </p> |
| 1151 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1152 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1153 | --find-copies-harder |
| 1154 | </dt> |
| 1155 | <dd> |
| 1156 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1157 | For performance reasons, by default, <code>-C</code> option finds copies only |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1158 | if the original file of the copy was modified in the same |
| 1159 | changeset. This flag makes the command |
| 1160 | inspect unmodified files as candidates for the source of |
| 1161 | copy. This is a very expensive operation for large |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 1162 | projects, so use it with caution. Giving more than one |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1163 | <code>-C</code> option has the same effect. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1164 | </p> |
| 1165 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1166 | <dt class="hdlist1"> |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 1167 | -D |
| 1168 | </dt> |
| 1169 | <dt class="hdlist1"> |
| 1170 | --irreversible-delete |
| 1171 | </dt> |
| 1172 | <dd> |
| 1173 | <p> |
| 1174 | Omit the preimage for deletes, i.e. print only the header but not |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1175 | the diff between the preimage and <code>/dev/null</code>. The resulting patch |
| 1176 | is not meant to be applied with <code>patch</code> nor <code>git apply</code>; this is |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 1177 | solely for people who want to just concentrate on reviewing the |
| 1178 | text after the change. In addition, the output obviously lack |
| 1179 | enough information to apply such a patch in reverse, even manually, |
| 1180 | hence the name of the option. |
| 1181 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1182 | <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] | 1183 | of a delete/create pair.</p></div> |
| 1184 | </dd> |
| 1185 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1186 | -l<num> |
| 1187 | </dt> |
| 1188 | <dd> |
| 1189 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1190 | The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1191 | is the number of potential rename/copy targets. This |
| 1192 | option prevents rename/copy detection from running if |
| 1193 | the number of rename/copy targets exceeds the specified |
| 1194 | number. |
| 1195 | </p> |
| 1196 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1197 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1198 | -O<orderfile> |
| 1199 | </dt> |
| 1200 | <dd> |
| 1201 | <p> |
| 1202 | Output the patch in the order specified in the |
| 1203 | <orderfile>, which has one shell glob pattern per line. |
| 1204 | </p> |
| 1205 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1206 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 1207 | -a |
| 1208 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1209 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1210 | --text |
| 1211 | </dt> |
| 1212 | <dd> |
| 1213 | <p> |
| 1214 | Treat all files as text. |
| 1215 | </p> |
| 1216 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1217 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1218 | --ignore-space-at-eol |
| 1219 | </dt> |
| 1220 | <dd> |
| 1221 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 1222 | Ignore changes in whitespace at EOL. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1223 | </p> |
| 1224 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1225 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 1226 | -b |
| 1227 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1228 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1229 | --ignore-space-change |
| 1230 | </dt> |
| 1231 | <dd> |
| 1232 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 1233 | Ignore changes in amount of whitespace. This ignores whitespace |
| 1234 | at line end, and considers all other sequences of one or |
| 1235 | more whitespace characters to be equivalent. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1236 | </p> |
| 1237 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1238 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 1239 | -w |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1240 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1241 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1242 | --ignore-all-space |
| 1243 | </dt> |
| 1244 | <dd> |
| 1245 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 1246 | Ignore whitespace when comparing lines. This ignores |
| 1247 | differences even if one line has whitespace where the other |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 1248 | line has none. |
| 1249 | </p> |
| 1250 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1251 | <dt class="hdlist1"> |
Junio C Hamano | 1d40ee8 | 2009-01-07 10:14:16 | [diff] [blame] | 1252 | --inter-hunk-context=<lines> |
| 1253 | </dt> |
| 1254 | <dd> |
| 1255 | <p> |
| 1256 | Show the context between diff hunks, up to the specified number |
| 1257 | of lines, thereby fusing hunks that are close to each other. |
| 1258 | </p> |
| 1259 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1260 | <dt class="hdlist1"> |
Junio C Hamano | 11821ed | 2011-10-19 18:42:09 | [diff] [blame] | 1261 | -W |
| 1262 | </dt> |
| 1263 | <dt class="hdlist1"> |
| 1264 | --function-context |
| 1265 | </dt> |
| 1266 | <dd> |
| 1267 | <p> |
| 1268 | Show whole surrounding functions of changes. |
| 1269 | </p> |
| 1270 | </dd> |
| 1271 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1272 | --ext-diff |
| 1273 | </dt> |
| 1274 | <dd> |
| 1275 | <p> |
| 1276 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1277 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 1278 | 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] | 1279 | </p> |
| 1280 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1281 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1282 | --no-ext-diff |
| 1283 | </dt> |
| 1284 | <dd> |
| 1285 | <p> |
| 1286 | Disallow external diff drivers. |
| 1287 | </p> |
| 1288 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1289 | <dt class="hdlist1"> |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 1290 | --textconv |
| 1291 | </dt> |
| 1292 | <dt class="hdlist1"> |
| 1293 | --no-textconv |
| 1294 | </dt> |
| 1295 | <dd> |
| 1296 | <p> |
| 1297 | Allow (or disallow) external text conversion filters to be run |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1298 | 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] | 1299 | details. Because textconv filters are typically a one-way |
| 1300 | conversion, the resulting diff is suitable for human |
| 1301 | consumption, but cannot be applied. For this reason, textconv |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1302 | filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and |
| 1303 | <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] | 1304 | diff plumbing commands. |
| 1305 | </p> |
| 1306 | </dd> |
| 1307 | <dt class="hdlist1"> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 1308 | --ignore-submodules[=<when>] |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 1309 | </dt> |
| 1310 | <dd> |
| 1311 | <p> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 1312 | Ignore changes to submodules in the diff generation. <when> can be |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 1313 | either "none", "untracked", "dirty" or "all", which is the default |
| 1314 | Using "none" will consider the submodule modified when it either contains |
| 1315 | untracked or modified files or its HEAD differs from the commit recorded |
| 1316 | 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] | 1317 | <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] | 1318 | "untracked" is used submodules are not considered dirty when they only |
| 1319 | contain untracked content (but they are still scanned for modified |
| 1320 | content). Using "dirty" ignores all changes to the work tree of submodules, |
| 1321 | only changes to the commits stored in the superproject are shown (this was |
| 1322 | 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] | 1323 | </p> |
| 1324 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1325 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 1326 | --src-prefix=<prefix> |
| 1327 | </dt> |
| 1328 | <dd> |
| 1329 | <p> |
| 1330 | Show the given source prefix instead of "a/". |
| 1331 | </p> |
| 1332 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1333 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 1334 | --dst-prefix=<prefix> |
| 1335 | </dt> |
| 1336 | <dd> |
| 1337 | <p> |
| 1338 | Show the given destination prefix instead of "b/". |
| 1339 | </p> |
| 1340 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1341 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 1342 | --no-prefix |
| 1343 | </dt> |
| 1344 | <dd> |
| 1345 | <p> |
| 1346 | Do not show any source or destination prefix. |
| 1347 | </p> |
| 1348 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1349 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1350 | <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] | 1351 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1352 | <div class="dlist"><dl> |
| 1353 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1354 | -<n> |
| 1355 | </dt> |
| 1356 | <dd> |
| 1357 | <p> |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 1358 | Prepare patches from the topmost <n> commits. |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 1359 | </p> |
| 1360 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1361 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1362 | -o <dir> |
| 1363 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1364 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1365 | --output-directory <dir> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1366 | </dt> |
| 1367 | <dd> |
| 1368 | <p> |
| 1369 | Use <dir> to store the resulting files, instead of the |
Junio C Hamano | 1bab4b0 | 2006-06-06 21:58:33 | [diff] [blame] | 1370 | current working directory. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1371 | </p> |
| 1372 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1373 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1374 | -n |
| 1375 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1376 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1377 | --numbered |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1378 | </dt> |
| 1379 | <dd> |
| 1380 | <p> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1381 | Name output in <em>[PATCH n/m]</em> format, even with a single patch. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1382 | </p> |
| 1383 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1384 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1385 | -N |
| 1386 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1387 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1388 | --no-numbered |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 1389 | </dt> |
| 1390 | <dd> |
| 1391 | <p> |
| 1392 | Name output in <em>[PATCH]</em> format. |
| 1393 | </p> |
| 1394 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1395 | <dt class="hdlist1"> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 1396 | --start-number <n> |
| 1397 | </dt> |
| 1398 | <dd> |
| 1399 | <p> |
| 1400 | Start numbering the patches at <n> instead of 1. |
| 1401 | </p> |
| 1402 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1403 | <dt class="hdlist1"> |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 1404 | --numbered-files |
| 1405 | </dt> |
| 1406 | <dd> |
| 1407 | <p> |
| 1408 | Output file names will be a simple number sequence |
| 1409 | without the default first line of the commit appended. |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 1410 | </p> |
| 1411 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1412 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1413 | -k |
| 1414 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1415 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1416 | --keep-subject |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1417 | </dt> |
| 1418 | <dd> |
| 1419 | <p> |
| 1420 | Do not strip/add <em>[PATCH]</em> from the first line of the |
| 1421 | commit log message. |
| 1422 | </p> |
| 1423 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1424 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1425 | -s |
| 1426 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1427 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1428 | --signoff |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1429 | </dt> |
| 1430 | <dd> |
| 1431 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1432 | Add <code>Signed-off-by:</code> line to the commit message, using |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1433 | the committer identity of yourself. |
| 1434 | </p> |
| 1435 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1436 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1437 | --stdout |
| 1438 | </dt> |
| 1439 | <dd> |
| 1440 | <p> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 1441 | Print all commits to the standard output in mbox format, |
| 1442 | instead of creating a file for each one. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1443 | </p> |
| 1444 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1445 | <dt class="hdlist1"> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1446 | --attach[=<boundary>] |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1447 | </dt> |
| 1448 | <dd> |
| 1449 | <p> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1450 | Create multipart/mixed attachment, the first part of |
| 1451 | which is the commit message and the patch itself in the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1452 | second part, with <code>Content-Disposition: attachment</code>. |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1453 | </p> |
| 1454 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1455 | <dt class="hdlist1"> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 1456 | --no-attach |
| 1457 | </dt> |
| 1458 | <dd> |
| 1459 | <p> |
| 1460 | Disable the creation of an attachment, overriding the |
| 1461 | configuration setting. |
| 1462 | </p> |
| 1463 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1464 | <dt class="hdlist1"> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1465 | --inline[=<boundary>] |
| 1466 | </dt> |
| 1467 | <dd> |
| 1468 | <p> |
| 1469 | Create multipart/mixed attachment, the first part of |
| 1470 | which is the commit message and the patch itself in the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1471 | second part, with <code>Content-Disposition: inline</code>. |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1472 | </p> |
| 1473 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1474 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 1475 | --thread[=<style>] |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1476 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1477 | <dt class="hdlist1"> |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1478 | --no-thread |
| 1479 | </dt> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1480 | <dd> |
| 1481 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1482 | Controls addition of <code>In-Reply-To</code> and <code>References</code> headers to |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1483 | make the second and subsequent mails appear as replies to the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1484 | first. Also controls generation of the <code>Message-Id</code> header to |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1485 | reference. |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1486 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1487 | <div class="paragraph"><p>The optional <style> argument can be either <code>shallow</code> or <code>deep</code>. |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1488 | <em>shallow</em> threading makes every mail a reply to the head of the |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 1489 | series, where the head is chosen from the cover letter, the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1490 | <code>--in-reply-to</code>, and the first patch mail, in this order. <em>deep</em> |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1491 | threading makes every mail a reply to the previous one.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1492 | <div class="paragraph"><p>The default is <code>--no-thread</code>, unless the <em>format.thread</em> configuration |
| 1493 | is set. If <code>--thread</code> is specified without a style, it defaults to the |
| 1494 | style specified by <em>format.thread</em> if any, or else <code>shallow</code>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1495 | <div class="paragraph"><p>Beware that the default for <em>git send-email</em> is to thread emails |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1496 | itself. If you want <code>git format-patch</code> to take care of threading, you |
| 1497 | will want to ensure that threading is disabled for <code>git send-email</code>.</p></div> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1498 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1499 | <dt class="hdlist1"> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1500 | --in-reply-to=Message-Id |
| 1501 | </dt> |
| 1502 | <dd> |
| 1503 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1504 | Make the first mail (or all the mails with <code>--no-thread</code>) appear as a |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1505 | reply to the given Message-Id, which avoids breaking threads to |
| 1506 | provide a new patch series. |
| 1507 | </p> |
| 1508 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1509 | <dt class="hdlist1"> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1510 | --ignore-if-in-upstream |
| 1511 | </dt> |
| 1512 | <dd> |
| 1513 | <p> |
| 1514 | Do not include a patch that matches a commit in |
| 1515 | <until>..<since>. This will examine all patches reachable |
| 1516 | from <since> but not from <until> and compare them with the |
| 1517 | patches being generated, and any patch that matches is |
| 1518 | ignored. |
| 1519 | </p> |
| 1520 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1521 | <dt class="hdlist1"> |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 1522 | --subject-prefix=<Subject-Prefix> |
| 1523 | </dt> |
| 1524 | <dd> |
| 1525 | <p> |
| 1526 | Instead of the standard <em>[PATCH]</em> prefix in the subject |
| 1527 | line, instead use <em>[<Subject-Prefix>]</em>. This |
| 1528 | allows for useful naming of a patch series, and can be |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1529 | combined with the <code>--numbered</code> option. |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 1530 | </p> |
| 1531 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1532 | <dt class="hdlist1"> |
Junio C Hamano | 7dac690 | 2013-01-12 08:25:31 | [diff] [blame] | 1533 | -v <n> |
| 1534 | </dt> |
| 1535 | <dt class="hdlist1"> |
| 1536 | --reroll-count=<n> |
| 1537 | </dt> |
| 1538 | <dd> |
| 1539 | <p> |
| 1540 | Mark the series as the <n>-th iteration of the topic. The |
| 1541 | output filenames have <code>v<n></code> pretended to them, and the |
| 1542 | subject prefix ("PATCH" by default, but configurable via the |
| 1543 | <code>--subject-prefix</code> option) has ` v<n>` appended to it. E.g. |
| 1544 | <code>--reroll-count=4</code> may produce <code>v4-0001-add-makefile.patch</code> |
| 1545 | file that has "Subject: [PATCH v4 1/20] Add makefile" in it. |
| 1546 | </p> |
| 1547 | </dd> |
| 1548 | <dt class="hdlist1"> |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1549 | --to=<email> |
| 1550 | </dt> |
| 1551 | <dd> |
| 1552 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1553 | Add a <code>To:</code> header to the email headers. This is in addition |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1554 | to any configured headers, and may be used multiple times. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1555 | The negated form <code>--no-to</code> discards all <code>To:</code> headers added so |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1556 | far (from config or command line). |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1557 | </p> |
| 1558 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1559 | <dt class="hdlist1"> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1560 | --cc=<email> |
| 1561 | </dt> |
| 1562 | <dd> |
| 1563 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1564 | Add a <code>Cc:</code> header to the email headers. This is in addition |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1565 | to any configured headers, and may be used multiple times. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1566 | The negated form <code>--no-cc</code> discards all <code>Cc:</code> headers added so |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1567 | far (from config or command line). |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1568 | </p> |
| 1569 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1570 | <dt class="hdlist1"> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1571 | --add-header=<header> |
| 1572 | </dt> |
| 1573 | <dd> |
| 1574 | <p> |
| 1575 | Add an arbitrary header to the email headers. This is in addition |
| 1576 | to any configured headers, and may be used multiple times. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1577 | For example, <code>--add-header="Organization: git-foo"</code>. |
| 1578 | The negated form <code>--no-add-header</code> discards <strong>all</strong> (<code>To:</code>, |
| 1579 | <code>Cc:</code>, and custom) headers added so far from config or command |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1580 | line. |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1581 | </p> |
| 1582 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1583 | <dt class="hdlist1"> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1584 | --cover-letter |
| 1585 | </dt> |
| 1586 | <dd> |
| 1587 | <p> |
Junio C Hamano | 92a4abd | 2008-08-15 05:34:44 | [diff] [blame] | 1588 | In addition to the patches, generate a cover letter file |
| 1589 | containing the shortlog and the overall diffstat. You can |
| 1590 | fill in a description in the file before sending it out. |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1591 | </p> |
| 1592 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1593 | <dt class="hdlist1"> |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1594 | --notes[=<ref>] |
| 1595 | </dt> |
| 1596 | <dd> |
| 1597 | <p> |
| 1598 | Append the notes (see <a href="git-notes.html">git-notes(1)</a>) for the commit |
| 1599 | after the three-dash line. |
| 1600 | </p> |
| 1601 | <div class="paragraph"><p>The expected use case of this is to write supporting explanation for |
| 1602 | the commit that does not belong to the commit log message proper, |
| 1603 | and include it with the patch submission. While one can simply write |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1604 | these explanations after <code>format-patch</code> has run but before sending, |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1605 | keeping them as Git notes allows them to be maintained between versions |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1606 | of the patch series (but see the discussion of the <code>notes.rewrite</code> |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1607 | configuration options in <a href="git-notes.html">git-notes(1)</a> to use this workflow).</p></div> |
| 1608 | </dd> |
| 1609 | <dt class="hdlist1"> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1610 | --[no]-signature=<signature> |
| 1611 | </dt> |
| 1612 | <dd> |
| 1613 | <p> |
| 1614 | Add a signature to each message produced. Per RFC 3676 the signature |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1615 | is separated from the body by a line with '-- ' on it. If the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1616 | signature option is omitted the signature defaults to the Git version |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1617 | number. |
| 1618 | </p> |
| 1619 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1620 | <dt class="hdlist1"> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1621 | --suffix=.<sfx> |
| 1622 | </dt> |
| 1623 | <dd> |
| 1624 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1625 | Instead of using <code>.patch</code> as the suffix for generated |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 1626 | filenames, use specified suffix. A common alternative is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1627 | <code>--suffix=.txt</code>. Leaving this empty will remove the <code>.patch</code> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1628 | suffix. |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1629 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1630 | <div class="paragraph"><p>Note that the leading character does not have to be a dot; for example, |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1631 | you can use <code>--suffix=-patch</code> to get <code>0001-description-of-my-change-patch</code>.</p></div> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1632 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1633 | <dt class="hdlist1"> |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 1634 | --quiet |
| 1635 | </dt> |
| 1636 | <dd> |
| 1637 | <p> |
| 1638 | Do not print the names of the generated files to standard output. |
| 1639 | </p> |
| 1640 | </dd> |
| 1641 | <dt class="hdlist1"> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1642 | --no-binary |
| 1643 | </dt> |
| 1644 | <dd> |
| 1645 | <p> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1646 | Do not output contents of changes in binary files, instead |
| 1647 | display a notice that those files changed. Patches generated |
| 1648 | using this option cannot be applied properly, but they are |
| 1649 | still useful for code review. |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1650 | </p> |
| 1651 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1652 | <dt class="hdlist1"> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1653 | --root |
| 1654 | </dt> |
| 1655 | <dd> |
| 1656 | <p> |
| 1657 | Treat the revision argument as a <revision range>, even if it |
| 1658 | is just a single commit (that would normally be treated as a |
| 1659 | <since>). Note that root commits included in the specified |
| 1660 | range are always formatted as creation patches, independently |
| 1661 | of this flag. |
| 1662 | </p> |
| 1663 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1664 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1665 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1666 | </div> |
| 1667 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1668 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1669 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1670 | <div class="paragraph"><p>You can specify extra mail header lines to be added to each message, |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1671 | defaults for the subject prefix and file suffix, number patches when |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1672 | outputting more than one patch, add "To" or "Cc:" headers, configure |
| 1673 | attachments, and sign off patches with configuration variables.</p></div> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1674 | <div class="listingblock"> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1675 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1676 | <pre><code>[format] |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1677 | headers = "Organization: git-foo\n" |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1678 | subjectprefix = CHANGE |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 1679 | suffix = .txt |
Junio C Hamano | 2fbcd21 | 2008-05-14 22:26:07 | [diff] [blame] | 1680 | numbered = auto |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1681 | to = <email> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 1682 | cc = <email> |
Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 1683 | attach [ = mime-boundary-string ] |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1684 | signoff = true</code></pre> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1685 | </div></div> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1686 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1687 | </div> |
| 1688 | <div class="sect1"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1689 | <h2 id="_discussion">DISCUSSION</h2> |
| 1690 | <div class="sectionbody"> |
| 1691 | <div class="paragraph"><p>The patch produced by <em>git format-patch</em> is in UNIX mailbox format, |
| 1692 | with a fixed "magic" time stamp to indicate that the file is output |
| 1693 | from format-patch rather than a real mailbox, like so:</p></div> |
| 1694 | <div class="listingblock"> |
| 1695 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1696 | <pre><code>From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001 |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1697 | From: Tony Luck <tony.luck@intel.com> |
| 1698 | Date: Tue, 13 Jul 2010 11:42:54 -0700 |
| 1699 | Subject: [PATCH] =?UTF-8?q?[IA64]=20Put=20ia64=20config=20files=20on=20the=20?= |
| 1700 | =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?= |
| 1701 | MIME-Version: 1.0 |
| 1702 | Content-Type: text/plain; charset=UTF-8 |
| 1703 | Content-Transfer-Encoding: 8bit |
| 1704 | |
| 1705 | arch/arm config files were slimmed down using a python script |
| 1706 | (See commit c2330e286f68f1c408b4aa6515ba49d57f05beae comment) |
| 1707 | |
| 1708 | Do the same for ia64 so we can have sleek & trim looking |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1709 | ...</code></pre> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1710 | </div></div> |
| 1711 | <div class="paragraph"><p>Typically it will be placed in a MUA’s drafts folder, edited to add |
| 1712 | timely commentary that should not go in the changelog after the three |
| 1713 | dashes, and then sent as a message whose body, in our example, starts |
| 1714 | with "arch/arm config files were…". On the receiving end, readers |
| 1715 | can save interesting patches in a UNIX mailbox and apply them with |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1716 | <a href="git-am.html">git-am(1)</a>.</p></div> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1717 | <div class="paragraph"><p>When a patch is part of an ongoing discussion, the patch generated by |
| 1718 | <em>git format-patch</em> can be tweaked to take advantage of the <em>git am |
| 1719 | --scissors</em> feature. After your response to the discussion comes a |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1720 | line that consists solely of "<code>-- >8 --</code>" (scissors and perforation), |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1721 | followed by the patch with unnecessary header fields removed:</p></div> |
| 1722 | <div class="listingblock"> |
| 1723 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1724 | <pre><code>... |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1725 | > So we should do such-and-such. |
| 1726 | |
| 1727 | Makes sense to me. How about this patch? |
| 1728 | |
| 1729 | -- >8 -- |
| 1730 | Subject: [IA64] Put ia64 config files on the Uwe Kleine-König diet |
| 1731 | |
| 1732 | arch/arm config files were slimmed down using a python script |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1733 | ...</code></pre> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1734 | </div></div> |
| 1735 | <div class="paragraph"><p>When sending a patch this way, most often you are sending your own |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1736 | patch, so in addition to the "<code>From $SHA1 $magic_timestamp</code>" marker you |
| 1737 | should omit <code>From:</code> and <code>Date:</code> lines from the patch file. The patch |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1738 | title is likely to be different from the subject of the discussion the |
| 1739 | patch is in response to, so it is likely that you would want to keep |
| 1740 | the Subject: line, like the example above.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1741 | <div class="sect2"> |
| 1742 | <h3 id="_checking_for_patch_corruption">Checking for patch corruption</h3> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1743 | <div class="paragraph"><p>Many mailers if not set up properly will corrupt whitespace. Here are |
| 1744 | two common types of corruption:</p></div> |
| 1745 | <div class="ulist"><ul> |
| 1746 | <li> |
| 1747 | <p> |
| 1748 | Empty context lines that do not have <em>any</em> whitespace. |
| 1749 | </p> |
| 1750 | </li> |
| 1751 | <li> |
| 1752 | <p> |
| 1753 | Non-empty context lines that have one extra whitespace at the |
| 1754 | beginning. |
| 1755 | </p> |
| 1756 | </li> |
| 1757 | </ul></div> |
| 1758 | <div class="paragraph"><p>One way to test if your MUA is set up correctly is:</p></div> |
| 1759 | <div class="ulist"><ul> |
| 1760 | <li> |
| 1761 | <p> |
| 1762 | Send the patch to yourself, exactly the way you would, except |
| 1763 | with To: and Cc: lines that do not contain the list and |
| 1764 | maintainer address. |
| 1765 | </p> |
| 1766 | </li> |
| 1767 | <li> |
| 1768 | <p> |
| 1769 | Save that patch to a file in UNIX mailbox format. Call it a.patch, |
| 1770 | say. |
| 1771 | </p> |
| 1772 | </li> |
| 1773 | <li> |
| 1774 | <p> |
| 1775 | Apply it: |
| 1776 | </p> |
| 1777 | <div class="literalblock"> |
| 1778 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1779 | <pre><code>$ git fetch <project> master:test-apply |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1780 | $ git checkout test-apply |
| 1781 | $ git reset --hard |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1782 | $ git am a.patch</code></pre> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1783 | </div></div> |
| 1784 | </li> |
| 1785 | </ul></div> |
| 1786 | <div class="paragraph"><p>If it does not apply correctly, there can be various reasons.</p></div> |
| 1787 | <div class="ulist"><ul> |
| 1788 | <li> |
| 1789 | <p> |
| 1790 | The patch itself does not apply cleanly. That is <em>bad</em> but |
| 1791 | does not have much to do with your MUA. You might want to rebase |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1792 | the patch with <a href="git-rebase.html">git-rebase(1)</a> before regenerating it in |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1793 | this case. |
| 1794 | </p> |
| 1795 | </li> |
| 1796 | <li> |
| 1797 | <p> |
| 1798 | The MUA corrupted your patch; "am" would complain that |
| 1799 | the patch does not apply. Look in the .git/rebase-apply/ subdirectory and |
| 1800 | see what <em>patch</em> file contains and check for the common |
| 1801 | corruption patterns mentioned above. |
| 1802 | </p> |
| 1803 | </li> |
| 1804 | <li> |
| 1805 | <p> |
| 1806 | While at it, check the <em>info</em> and <em>final-commit</em> files as well. |
| 1807 | If what is in <em>final-commit</em> is not exactly what you would want to |
| 1808 | see in the commit log message, it is very likely that the |
| 1809 | receiver would end up hand editing the log message when applying |
| 1810 | your patch. Things like "Hi, this is my first patch.\n" in the |
| 1811 | patch e-mail should come after the three-dash line that signals |
| 1812 | the end of the commit message. |
| 1813 | </p> |
| 1814 | </li> |
| 1815 | </ul></div> |
| 1816 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1817 | </div> |
| 1818 | </div> |
| 1819 | <div class="sect1"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1820 | <h2 id="_mua_specific_hints">MUA-SPECIFIC HINTS</h2> |
| 1821 | <div class="sectionbody"> |
| 1822 | <div class="paragraph"><p>Here are some hints on how to successfully submit patches inline using |
| 1823 | various mailers.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1824 | <div class="sect2"> |
| 1825 | <h3 id="_gmail">GMail</h3> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1826 | <div class="paragraph"><p>GMail does not have any way to turn off line wrapping in the web |
| 1827 | interface, so it will mangle any emails that you send. You can however |
| 1828 | use "git send-email" and send your patches through the GMail SMTP server, or |
| 1829 | use any IMAP email client to connect to the google IMAP server and forward |
| 1830 | the emails through that.</p></div> |
| 1831 | <div class="paragraph"><p>For hints on using <em>git send-email</em> to send your patches through the |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1832 | GMail SMTP server, see the EXAMPLE section of <a href="git-send-email.html">git-send-email(1)</a>.</p></div> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1833 | <div class="paragraph"><p>For hints on submission using the IMAP interface, see the EXAMPLE |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1834 | section of <a href="git-imap-send.html">git-imap-send(1)</a>.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1835 | </div> |
| 1836 | <div class="sect2"> |
| 1837 | <h3 id="_thunderbird">Thunderbird</h3> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1838 | <div class="paragraph"><p>By default, Thunderbird will both wrap emails as well as flag |
| 1839 | them as being <em>format=flowed</em>, both of which will make the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1840 | resulting email unusable by Git.</p></div> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1841 | <div class="paragraph"><p>There are three different approaches: use an add-on to turn off line wraps, |
| 1842 | configure Thunderbird to not mangle patches, or use |
| 1843 | an external editor to keep Thunderbird from mangling the patches.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1844 | <div class="sect3"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1845 | <h4 id="_approach_1_add_on">Approach #1 (add-on)</h4> |
| 1846 | <div class="paragraph"><p>Install the Toggle Word Wrap add-on that is available from |
| 1847 | <a href="https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/">https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/</a> |
| 1848 | It adds a menu entry "Enable Word Wrap" in the composer’s "Options" menu |
| 1849 | that you can tick off. Now you can compose the message as you otherwise do |
| 1850 | (cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc), but you have to |
| 1851 | insert line breaks manually in any text that you type.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1852 | </div> |
| 1853 | <div class="sect3"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1854 | <h4 id="_approach_2_configuration">Approach #2 (configuration)</h4> |
| 1855 | <div class="paragraph"><p>Three steps:</p></div> |
| 1856 | <div class="olist arabic"><ol class="arabic"> |
| 1857 | <li> |
| 1858 | <p> |
| 1859 | Configure your mail server composition as plain text: |
| 1860 | Edit…Account Settings…Composition & Addressing, |
| 1861 | uncheck "Compose Messages in HTML". |
| 1862 | </p> |
| 1863 | </li> |
| 1864 | <li> |
| 1865 | <p> |
| 1866 | Configure your general composition window to not wrap. |
| 1867 | </p> |
| 1868 | <div class="paragraph"><p>In Thunderbird 2: |
| 1869 | Edit..Preferences..Composition, wrap plain text messages at 0</p></div> |
| 1870 | <div class="paragraph"><p>In Thunderbird 3: |
| 1871 | Edit..Preferences..Advanced..Config Editor. Search for |
| 1872 | "mail.wrap_long_lines". |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1873 | Toggle it to make sure it is set to <code>false</code>.</p></div> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1874 | </li> |
| 1875 | <li> |
| 1876 | <p> |
| 1877 | Disable the use of format=flowed: |
| 1878 | Edit..Preferences..Advanced..Config Editor. Search for |
| 1879 | "mailnews.send_plaintext_flowed". |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1880 | Toggle it to make sure it is set to <code>false</code>. |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1881 | </p> |
| 1882 | </li> |
| 1883 | </ol></div> |
| 1884 | <div class="paragraph"><p>After that is done, you should be able to compose email as you |
| 1885 | otherwise would (cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc), |
| 1886 | and the patches will not be mangled.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1887 | </div> |
| 1888 | <div class="sect3"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1889 | <h4 id="_approach_3_external_editor">Approach #3 (external editor)</h4> |
| 1890 | <div class="paragraph"><p>The following Thunderbird extensions are needed: |
| 1891 | AboutConfig from <a href="http://aboutconfig.mozdev.org/">http://aboutconfig.mozdev.org/</a> and |
| 1892 | External Editor from <a href="http://globs.org/articles.php?lng=en&pg=8">http://globs.org/articles.php?lng=en&pg=8</a></p></div> |
| 1893 | <div class="olist arabic"><ol class="arabic"> |
| 1894 | <li> |
| 1895 | <p> |
| 1896 | Prepare the patch as a text file using your method of choice. |
| 1897 | </p> |
| 1898 | </li> |
| 1899 | <li> |
| 1900 | <p> |
| 1901 | Before opening a compose window, use Edit→Account Settings to |
| 1902 | uncheck the "Compose messages in HTML format" setting in the |
| 1903 | "Composition & Addressing" panel of the account to be used to |
| 1904 | send the patch. |
| 1905 | </p> |
| 1906 | </li> |
| 1907 | <li> |
| 1908 | <p> |
| 1909 | In the main Thunderbird window, <em>before</em> you open the compose |
| 1910 | window for the patch, use Tools→about:config to set the |
| 1911 | following to the indicated values: |
| 1912 | </p> |
| 1913 | <div class="listingblock"> |
| 1914 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1915 | <pre><code> mailnews.send_plaintext_flowed => false |
| 1916 | mailnews.wraplength => 0</code></pre> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1917 | </div></div> |
| 1918 | </li> |
| 1919 | <li> |
| 1920 | <p> |
| 1921 | Open a compose window and click the external editor icon. |
| 1922 | </p> |
| 1923 | </li> |
| 1924 | <li> |
| 1925 | <p> |
| 1926 | In the external editor window, read in the patch file and exit |
| 1927 | the editor normally. |
| 1928 | </p> |
| 1929 | </li> |
| 1930 | </ol></div> |
| 1931 | <div class="paragraph"><p>Side note: it may be possible to do step 2 with |
| 1932 | about:config and the following settings but no one’s tried yet.</p></div> |
| 1933 | <div class="listingblock"> |
| 1934 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1935 | <pre><code> mail.html_compose => false |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1936 | mail.identity.default.compose_html => false |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1937 | mail.identity.id?.compose_html => false</code></pre> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1938 | </div></div> |
| 1939 | <div class="paragraph"><p>There is a script in contrib/thunderbird-patch-inline which can help |
| 1940 | you include patches with Thunderbird in an easy way. To use it, do the |
| 1941 | steps above and then use the script as the external editor.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1942 | </div> |
| 1943 | </div> |
| 1944 | <div class="sect2"> |
| 1945 | <h3 id="_kmail">KMail</h3> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1946 | <div class="paragraph"><p>This should help you to submit patches inline using KMail.</p></div> |
| 1947 | <div class="olist arabic"><ol class="arabic"> |
| 1948 | <li> |
| 1949 | <p> |
| 1950 | Prepare the patch as a text file. |
| 1951 | </p> |
| 1952 | </li> |
| 1953 | <li> |
| 1954 | <p> |
| 1955 | Click on New Mail. |
| 1956 | </p> |
| 1957 | </li> |
| 1958 | <li> |
| 1959 | <p> |
| 1960 | Go under "Options" in the Composer window and be sure that |
| 1961 | "Word wrap" is not set. |
| 1962 | </p> |
| 1963 | </li> |
| 1964 | <li> |
| 1965 | <p> |
| 1966 | Use Message → Insert file… and insert the patch. |
| 1967 | </p> |
| 1968 | </li> |
| 1969 | <li> |
| 1970 | <p> |
| 1971 | Back in the compose window: add whatever other text you wish to the |
| 1972 | message, complete the addressing and subject fields, and press send. |
| 1973 | </p> |
| 1974 | </li> |
| 1975 | </ol></div> |
| 1976 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1977 | </div> |
| 1978 | </div> |
| 1979 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1980 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1981 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1982 | <div class="ulist"><ul> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1983 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1984 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1985 | Extract commits between revisions R1 and R2, and apply them on top of |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1986 | the current branch using <em>git am</em> to cherry-pick them: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1987 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1988 | <div class="listingblock"> |
| 1989 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1990 | <pre><code>$ git format-patch -k --stdout R1..R2 | git am -3 -k</code></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1991 | </div></div> |
| 1992 | </li> |
| 1993 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1994 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1995 | Extract all commits which are in the current branch but not in the |
| 1996 | origin branch: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1997 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1998 | <div class="listingblock"> |
| 1999 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2000 | <pre><code>$ git format-patch origin</code></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2001 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2002 | <div class="paragraph"><p>For each commit a separate file is created in the current directory.</p></div> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2003 | </li> |
| 2004 | <li> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 2005 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2006 | Extract all commits that lead to <em>origin</em> since the inception of the |
| 2007 | project: |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 2008 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2009 | <div class="listingblock"> |
| 2010 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2011 | <pre><code>$ git format-patch --root origin</code></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2012 | </div></div> |
| 2013 | </li> |
| 2014 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2015 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2016 | The same as the previous one: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2017 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2018 | <div class="listingblock"> |
| 2019 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2020 | <pre><code>$ git format-patch -M -B origin</code></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2021 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2022 | <div class="paragraph"><p>Additionally, it detects and handles renames and complete rewrites |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2023 | intelligently to produce a renaming patch. A renaming patch reduces |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 2024 | the amount of text output, and generally makes it easier to review. |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 2025 | Note that non-Git "patch" programs won’t understand renaming patches, so |
| 2026 | use it only when you know the recipient uses Git to apply your patch.</p></div> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2027 | </li> |
| 2028 | <li> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 2029 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2030 | Extract three topmost commits from the current branch and format them |
| 2031 | as e-mailable patches: |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 2032 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2033 | <div class="listingblock"> |
| 2034 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2035 | <pre><code>$ git format-patch -3</code></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 2036 | </div></div> |
| 2037 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2038 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2039 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2040 | </div> |
| 2041 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2042 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2043 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2044 | <div class="paragraph"><p><a href="git-am.html">git-am(1)</a>, <a href="git-send-email.html">git-send-email(1)</a></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2045 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2046 | </div> |
| 2047 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2048 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2049 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2050 | <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] | 2051 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2052 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2053 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2054 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2055 | <div id="footer"> |
| 2056 | <div id="footer-text"> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 2057 | Last updated 2013-02-05 21:07:26 PST |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2058 | </div> |
| 2059 | </div> |
| 2060 | </body> |
| 2061 | </html> |