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> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.4.5" /> |
| 7 | <title>git-format-patch(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
| 9 | /* Debug borders */ |
| 10 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 11 | /* |
| 12 | border: 1px solid red; |
| 13 | */ |
| 14 | } |
| 15 | |
| 16 | body { |
| 17 | margin: 1em 5% 1em 5%; |
| 18 | } |
| 19 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 20 | a { |
| 21 | color: blue; |
| 22 | text-decoration: underline; |
| 23 | } |
| 24 | a:visited { |
| 25 | color: fuchsia; |
| 26 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | |
| 28 | em { |
| 29 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 30 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | strong { |
| 34 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 35 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | tt { |
| 39 | color: navy; |
| 40 | } |
| 41 | |
| 42 | h1, h2, h3, h4, h5, h6 { |
| 43 | color: #527bbd; |
| 44 | font-family: sans-serif; |
| 45 | margin-top: 1.2em; |
| 46 | margin-bottom: 0.5em; |
| 47 | line-height: 1.3; |
| 48 | } |
| 49 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 50 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | border-bottom: 2px solid silver; |
| 52 | } |
| 53 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 54 | padding-top: 0.5em; |
| 55 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 56 | h3 { |
| 57 | float: left; |
| 58 | } |
| 59 | h3 + * { |
| 60 | clear: left; |
| 61 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 62 | |
| 63 | div.sectionbody { |
| 64 | font-family: serif; |
| 65 | margin-left: 0; |
| 66 | } |
| 67 | |
| 68 | hr { |
| 69 | border: 1px solid silver; |
| 70 | } |
| 71 | |
| 72 | p { |
| 73 | margin-top: 0.5em; |
| 74 | margin-bottom: 0.5em; |
| 75 | } |
| 76 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 77 | ul, ol, li > p { |
| 78 | margin-top: 0; |
| 79 | } |
| 80 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 81 | pre { |
| 82 | padding: 0; |
| 83 | margin: 0; |
| 84 | } |
| 85 | |
| 86 | span#author { |
| 87 | color: #527bbd; |
| 88 | font-family: sans-serif; |
| 89 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 90 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 91 | } |
| 92 | span#email { |
| 93 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 94 | span#revnumber, span#revdate, span#revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 95 | font-family: sans-serif; |
| 96 | } |
| 97 | |
| 98 | div#footer { |
| 99 | font-family: sans-serif; |
| 100 | font-size: small; |
| 101 | border-top: 2px solid silver; |
| 102 | padding-top: 0.5em; |
| 103 | margin-top: 4.0em; |
| 104 | } |
| 105 | div#footer-text { |
| 106 | float: left; |
| 107 | padding-bottom: 0.5em; |
| 108 | } |
| 109 | div#footer-badges { |
| 110 | float: right; |
| 111 | padding-bottom: 0.5em; |
| 112 | } |
| 113 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 114 | div#preamble { |
| 115 | margin-top: 1.5em; |
| 116 | margin-bottom: 1.5em; |
| 117 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 118 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 119 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 120 | div.admonitionblock { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 121 | margin-top: 1.5em; |
| 122 | margin-bottom: 1.5em; |
| 123 | } |
| 124 | div.admonitionblock { |
| 125 | margin-top: 2.5em; |
| 126 | margin-bottom: 2.5em; |
| 127 | } |
| 128 | |
| 129 | div.content { /* Block element content. */ |
| 130 | padding: 0; |
| 131 | } |
| 132 | |
| 133 | /* Block element titles. */ |
| 134 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 135 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 136 | font-family: sans-serif; |
| 137 | font-weight: bold; |
| 138 | text-align: left; |
| 139 | margin-top: 1.0em; |
| 140 | margin-bottom: 0.5em; |
| 141 | } |
| 142 | div.title + * { |
| 143 | margin-top: 0; |
| 144 | } |
| 145 | |
| 146 | td div.title:first-child { |
| 147 | margin-top: 0.0em; |
| 148 | } |
| 149 | div.content div.title:first-child { |
| 150 | margin-top: 0.0em; |
| 151 | } |
| 152 | div.content + div.title { |
| 153 | margin-top: 0.0em; |
| 154 | } |
| 155 | |
| 156 | div.sidebarblock > div.content { |
| 157 | background: #ffffee; |
| 158 | border: 1px solid silver; |
| 159 | padding: 0.5em; |
| 160 | } |
| 161 | |
| 162 | div.listingblock > div.content { |
| 163 | border: 1px solid silver; |
| 164 | background: #f4f4f4; |
| 165 | padding: 0.5em; |
| 166 | } |
| 167 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 168 | div.quoteblock { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 169 | padding-left: 2.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 170 | margin-right: 10%; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 172 | div.quoteblock > div.attribution { |
| 173 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 174 | text-align: right; |
| 175 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 176 | |
| 177 | div.verseblock { |
| 178 | padding-left: 2.0em; |
| 179 | margin-right: 10%; |
| 180 | } |
| 181 | div.verseblock > div.content { |
| 182 | white-space: pre; |
| 183 | } |
| 184 | div.verseblock > div.attribution { |
| 185 | padding-top: 0.75em; |
| 186 | text-align: left; |
| 187 | } |
| 188 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 189 | div.verseblock + div.attribution { |
| 190 | text-align: left; |
| 191 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 192 | |
| 193 | div.admonitionblock .icon { |
| 194 | vertical-align: top; |
| 195 | font-size: 1.1em; |
| 196 | font-weight: bold; |
| 197 | text-decoration: underline; |
| 198 | color: #527bbd; |
| 199 | padding-right: 0.5em; |
| 200 | } |
| 201 | div.admonitionblock td.content { |
| 202 | padding-left: 0.5em; |
| 203 | border-left: 2px solid silver; |
| 204 | } |
| 205 | |
| 206 | div.exampleblock > div.content { |
| 207 | border-left: 2px solid silver; |
| 208 | padding: 0.5em; |
| 209 | } |
| 210 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 211 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 212 | span.image img { border-style: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 213 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 214 | |
| 215 | dl { |
| 216 | margin-top: 0.8em; |
| 217 | margin-bottom: 0.8em; |
| 218 | } |
| 219 | dt { |
| 220 | margin-top: 0.5em; |
| 221 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 222 | font-style: normal; |
| 223 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 224 | } |
| 225 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 226 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | ul, ol { |
| 230 | list-style-position: outside; |
| 231 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 232 | ol.arabic { |
| 233 | list-style-type: decimal; |
| 234 | } |
| 235 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | list-style-type: lower-alpha; |
| 237 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 238 | ol.upperalpha { |
| 239 | list-style-type: upper-alpha; |
| 240 | } |
| 241 | ol.lowerroman { |
| 242 | list-style-type: lower-roman; |
| 243 | } |
| 244 | ol.upperroman { |
| 245 | list-style-type: upper-roman; |
| 246 | } |
| 247 | |
| 248 | div.compact ul, div.compact ol, |
| 249 | div.compact p, div.compact p, |
| 250 | div.compact div, div.compact div { |
| 251 | margin-top: 0.1em; |
| 252 | margin-bottom: 0.1em; |
| 253 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 254 | |
| 255 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 256 | border: 3px solid #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 257 | } |
| 258 | thead { |
| 259 | font-family: sans-serif; |
| 260 | font-weight: bold; |
| 261 | } |
| 262 | tfoot { |
| 263 | font-weight: bold; |
| 264 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 265 | td > div.verse { |
| 266 | white-space: pre; |
| 267 | } |
| 268 | p.table { |
| 269 | margin-top: 0; |
| 270 | } |
| 271 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 272 | div.tableblock > table[frame="void"] { |
| 273 | border-style: none; |
| 274 | } |
| 275 | div.tableblock > table[frame="hsides"] { |
| 276 | border-left-style: none; |
| 277 | border-right-style: none; |
| 278 | } |
| 279 | div.tableblock > table[frame="vsides"] { |
| 280 | border-top-style: none; |
| 281 | border-bottom-style: none; |
| 282 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 283 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 284 | |
| 285 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 286 | margin-top: 0.8em; |
| 287 | margin-bottom: 0.8em; |
| 288 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 289 | div.hdlist tr { |
| 290 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 291 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 292 | dt.hdlist1.strong, td.hdlist1.strong { |
| 293 | font-weight: bold; |
| 294 | } |
| 295 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 296 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 297 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 298 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 299 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 300 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 301 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 302 | vertical-align: top; |
| 303 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 304 | div.hdlist.compact tr { |
| 305 | margin: 0; |
| 306 | padding-bottom: 0; |
| 307 | } |
| 308 | |
| 309 | .comment { |
| 310 | background: yellow; |
| 311 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 312 | |
| 313 | @media print { |
| 314 | div#footer-badges { display: none; } |
| 315 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 316 | |
| 317 | div#toctitle { |
| 318 | color: #527bbd; |
| 319 | font-family: sans-serif; |
| 320 | font-size: 1.1em; |
| 321 | font-weight: bold; |
| 322 | margin-top: 1.0em; |
| 323 | margin-bottom: 0.1em; |
| 324 | } |
| 325 | |
| 326 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 327 | margin-top: 0; |
| 328 | margin-bottom: 0; |
| 329 | } |
| 330 | div.toclevel2 { |
| 331 | margin-left: 2em; |
| 332 | font-size: 0.9em; |
| 333 | } |
| 334 | div.toclevel3 { |
| 335 | margin-left: 4em; |
| 336 | font-size: 0.9em; |
| 337 | } |
| 338 | div.toclevel4 { |
| 339 | margin-left: 6em; |
| 340 | font-size: 0.9em; |
| 341 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 342 | /* Overrides for manpage documents */ |
| 343 | h1 { |
| 344 | padding-top: 0.5em; |
| 345 | padding-bottom: 0.5em; |
| 346 | border-top: 2px solid silver; |
| 347 | border-bottom: 2px solid silver; |
| 348 | } |
| 349 | h2 { |
| 350 | border-style: none; |
| 351 | } |
| 352 | div.sectionbody { |
| 353 | margin-left: 5%; |
| 354 | } |
| 355 | |
| 356 | @media print { |
| 357 | div#toc { display: none; } |
| 358 | } |
| 359 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 360 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 361 | |
| 362 | div.sidebar-content { |
| 363 | background: #ffffee; |
| 364 | border: 1px solid silver; |
| 365 | padding: 0.5em; |
| 366 | } |
| 367 | div.sidebar-title, div.image-title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 368 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 369 | font-family: sans-serif; |
| 370 | font-weight: bold; |
| 371 | margin-top: 0.0em; |
| 372 | margin-bottom: 0.5em; |
| 373 | } |
| 374 | |
| 375 | div.listingblock div.content { |
| 376 | border: 1px solid silver; |
| 377 | background: #f4f4f4; |
| 378 | padding: 0.5em; |
| 379 | } |
| 380 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 381 | div.quoteblock-attribution { |
| 382 | padding-top: 0.5em; |
| 383 | text-align: right; |
| 384 | } |
| 385 | |
| 386 | div.verseblock-content { |
| 387 | white-space: pre; |
| 388 | } |
| 389 | div.verseblock-attribution { |
| 390 | padding-top: 0.75em; |
| 391 | text-align: left; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 392 | } |
| 393 | |
| 394 | div.exampleblock-content { |
| 395 | border-left: 2px solid silver; |
| 396 | padding-left: 0.5em; |
| 397 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 398 | |
| 399 | /* IE6 sets dynamically generated links as visited. */ |
| 400 | div#toc a:visited { color: blue; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 401 | </style> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 402 | </head> |
| 403 | <body> |
| 404 | <div id="header"> |
| 405 | <h1> |
| 406 | git-format-patch(1) Manual Page |
| 407 | </h1> |
| 408 | <h2>NAME</h2> |
| 409 | <div class="sectionbody"> |
| 410 | <p>git-format-patch - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 411 | Prepare patches for e-mail submission |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 412 | </p> |
| 413 | </div> |
| 414 | </div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 415 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 416 | <div class="sectionbody"> |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 417 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 418 | <div class="verseblock-content"><em>git format-patch</em> [-k] [(-o|--output-directory) <dir> | --stdout] |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 419 | [--no-thread | --thread[=<style>]] |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 420 | [(--attach|--inline)[=<boundary>] | --no-attach] |
| 421 | [-s | --signoff] |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 422 | [--signature=<signature> | --no-signature] |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 423 | [-n | --numbered | -N | --no-numbered] |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 424 | [--start-number <n>] [--numbered-files] |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 425 | [--in-reply-to=Message-Id] [--suffix=.<sfx>] |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 426 | [--ignore-if-in-upstream] |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 427 | [--subject-prefix=Subject-Prefix] |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 428 | [--to=<email>] [--cc=<email>] |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 429 | [--cover-letter] [--quiet] |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 430 | [<common diff options>] |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 431 | [ <since> | <revision range> ]</div> |
| 432 | <div class="verseblock-attribution"> |
| 433 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 434 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 435 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 436 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 437 | <div class="paragraph"><p>Prepare each commit with its patch in |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 438 | one file per commit, formatted to resemble UNIX mailbox format. |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 439 | The output of this command is convenient for e-mail submission or |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 440 | for use with <em>git am</em>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 441 | <div class="paragraph"><p>There are two ways to specify which commits to operate on.</p></div> |
| 442 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 443 | <li> |
| 444 | <p> |
| 445 | A single commit, <since>, specifies that the commits leading |
| 446 | to the tip of the current branch that are not in the history |
| 447 | that leads to the <since> to be output. |
| 448 | </p> |
| 449 | </li> |
| 450 | <li> |
| 451 | <p> |
| 452 | Generic <revision range> expression (see "SPECIFYING |
Junio C Hamano | c27b733 | 2010-10-14 04:37:28 | [diff] [blame] | 453 | REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>) means the |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 454 | commits in the specified range. |
| 455 | </p> |
| 456 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 457 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 458 | <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] | 459 | apply the second rule, i.e., format everything since the beginning of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 460 | history up until <commit>, use the <em>--root</em> option: <tt>git format-patch |
| 461 | --root <commit></tt>. If you want to format only <commit> itself, you |
| 462 | can do this with <tt>git format-patch -1 <commit></tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 463 | <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] | 464 | first line of the commit message (massaged for pathname safety) as |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 465 | the filename. With the <tt>--numbered-files</tt> option, the output file names |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 466 | will only be numbers, without the first line of the commit appended. |
| 467 | The names of the output files are printed to standard |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 468 | output, unless the <tt>--stdout</tt> option is specified.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 469 | <div class="paragraph"><p>If <tt>-o</tt> is specified, output files are created in <dir>. Otherwise |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 470 | they are created in the current working directory.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 471 | <div class="paragraph"><p>By default, the subject of a single patch is "[PATCH] First Line" and |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 472 | the subject when multiple patches are output is "[PATCH n/m] First |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 473 | Line". To force 1/1 to be added for a single patch, use <tt>-n</tt>. To omit |
| 474 | patch numbers from the subject, use <tt>-N</tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 475 | <div class="paragraph"><p>If given <tt>--thread</tt>, <tt>git-format-patch</tt> will generate <tt>In-Reply-To</tt> and |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 476 | <tt>References</tt> headers to make the second and subsequent patch mails appear |
| 477 | as replies to the first mail; this also generates a <tt>Message-Id</tt> header to |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 478 | reference.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 479 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 480 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 481 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 482 | <div class="dlist"><dl> |
| 483 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 484 | -p |
| 485 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 486 | <dt class="hdlist1"> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 487 | --no-stat |
| 488 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 489 | <dd> |
| 490 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 491 | Generate plain patches without any diffstats. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 492 | </p> |
| 493 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 494 | <dt class="hdlist1"> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 495 | -U<n> |
| 496 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 497 | <dt class="hdlist1"> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 498 | --unified=<n> |
| 499 | </dt> |
| 500 | <dd> |
| 501 | <p> |
| 502 | Generate diffs with <n> lines of context instead of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 503 | the usual three. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 504 | </p> |
| 505 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 506 | <dt class="hdlist1"> |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 507 | --patience |
| 508 | </dt> |
| 509 | <dd> |
| 510 | <p> |
| 511 | Generate a diff using the "patience diff" algorithm. |
| 512 | </p> |
| 513 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 514 | <dt class="hdlist1"> |
Junio C Hamano | 4c4b012 | 2011-06-30 01:19:32 | [diff] [blame] | 515 | --stat[=<width>[,<name-width>[,<count>]]] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 516 | </dt> |
| 517 | <dd> |
| 518 | <p> |
| 519 | Generate a diffstat. You can override the default |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 520 | output width for 80-column terminal by <tt>--stat=<width></tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 521 | The width of the filename part can be controlled by |
| 522 | giving another width to it separated by a comma. |
Junio C Hamano | 4c4b012 | 2011-06-30 01:19:32 | [diff] [blame] | 523 | By giving a third parameter <tt><count></tt>, you can limit the |
| 524 | output to the first <tt><count></tt> lines, followed by |
| 525 | <tt>…</tt> if there are more. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 526 | </p> |
Junio C Hamano | 4c4b012 | 2011-06-30 01:19:32 | [diff] [blame] | 527 | <div class="paragraph"><p>These parameters can also be set individually with <tt>--stat-width=<width></tt>, |
| 528 | <tt>--stat-name-width=<name-width></tt> and <tt>--stat-count=<count></tt>.</p></div> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 529 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 530 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 531 | --numstat |
| 532 | </dt> |
| 533 | <dd> |
| 534 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 535 | Similar to <tt>--stat</tt>, but shows number of added and |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 536 | deleted lines in decimal notation and pathname without |
| 537 | abbreviation, to make it more machine friendly. For |
| 538 | binary files, outputs two <tt>-</tt> instead of saying |
| 539 | <tt>0 0</tt>. |
| 540 | </p> |
| 541 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 542 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 543 | --shortstat |
| 544 | </dt> |
| 545 | <dd> |
| 546 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 547 | Output only the last line of the <tt>--stat</tt> format containing total |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 548 | number of modified files, as well as number of added and deleted |
| 549 | lines. |
| 550 | </p> |
| 551 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 552 | <dt class="hdlist1"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 553 | --dirstat[=<param1,param2,…>] |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 554 | </dt> |
| 555 | <dd> |
| 556 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 557 | Output the distribution of relative amount of changes for each |
| 558 | sub-directory. The behavior of <tt>--dirstat</tt> can be customized by |
| 559 | passing it a comma separated list of parameters. |
| 560 | The defaults are controlled by the <tt>diff.dirstat</tt> configuration |
| 561 | variable (see <a href="git-config.html">git-config(1)</a>). |
| 562 | The following parameters are available: |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 563 | </p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 564 | <div class="dlist"><dl> |
| 565 | <dt class="hdlist1"> |
| 566 | <tt>changes</tt> |
| 567 | </dt> |
| 568 | <dd> |
| 569 | <p> |
| 570 | Compute the dirstat numbers by counting the lines that have been |
| 571 | removed from the source, or added to the destination. This ignores |
| 572 | the amount of pure code movements within a file. In other words, |
| 573 | rearranging lines in a file is not counted as much as other changes. |
| 574 | This is the default behavior when no parameter is given. |
| 575 | </p> |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 576 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 577 | <dt class="hdlist1"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 578 | <tt>lines</tt> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 579 | </dt> |
| 580 | <dd> |
| 581 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 582 | Compute the dirstat numbers by doing the regular line-based diff |
| 583 | analysis, and summing the removed/added line counts. (For binary |
| 584 | files, count 64-byte chunks instead, since binary files have no |
| 585 | natural concept of lines). This is a more expensive <tt>--dirstat</tt> |
| 586 | behavior than the <tt>changes</tt> behavior, but it does count rearranged |
| 587 | lines within a file as much as other changes. The resulting output |
| 588 | is consistent with what you get from the other <tt>--*stat</tt> options. |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 589 | </p> |
| 590 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 591 | <dt class="hdlist1"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 592 | <tt>files</tt> |
| 593 | </dt> |
| 594 | <dd> |
| 595 | <p> |
| 596 | Compute the dirstat numbers by counting the number of files changed. |
| 597 | Each changed file counts equally in the dirstat analysis. This is |
| 598 | the computationally cheapest <tt>--dirstat</tt> behavior, since it does |
| 599 | not have to look at the file contents at all. |
| 600 | </p> |
| 601 | </dd> |
| 602 | <dt class="hdlist1"> |
| 603 | <tt>cumulative</tt> |
| 604 | </dt> |
| 605 | <dd> |
| 606 | <p> |
| 607 | Count changes in a child directory for the parent directory as well. |
| 608 | Note that when using <tt>cumulative</tt>, the sum of the percentages |
| 609 | reported may exceed 100%. The default (non-cumulative) behavior can |
| 610 | be specified with the <tt>noncumulative</tt> parameter. |
| 611 | </p> |
| 612 | </dd> |
| 613 | <dt class="hdlist1"> |
| 614 | <limit> |
| 615 | </dt> |
| 616 | <dd> |
| 617 | <p> |
| 618 | An integer parameter specifies a cut-off percent (3% by default). |
| 619 | Directories contributing less than this percentage of the changes |
| 620 | are not shown in the output. |
| 621 | </p> |
| 622 | </dd> |
| 623 | </dl></div> |
| 624 | <div class="paragraph"><p>Example: The following will count changed files, while ignoring |
| 625 | directories with less than 10% of the total amount of changed files, |
| 626 | and accumulating child directory counts in the parent directories: |
| 627 | <tt>--dirstat=files,10,cumulative</tt>.</p></div> |
| 628 | </dd> |
| 629 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 630 | --summary |
| 631 | </dt> |
| 632 | <dd> |
| 633 | <p> |
| 634 | Output a condensed summary of extended header information |
| 635 | such as creations, renames and mode changes. |
| 636 | </p> |
| 637 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 638 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 639 | --no-renames |
| 640 | </dt> |
| 641 | <dd> |
| 642 | <p> |
| 643 | Turn off rename detection, even when the configuration |
| 644 | file gives the default to do so. |
| 645 | </p> |
| 646 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 647 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 648 | --full-index |
| 649 | </dt> |
| 650 | <dd> |
| 651 | <p> |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 652 | Instead of the first handful of characters, show the full |
| 653 | pre- and post-image blob object names on the "index" |
| 654 | line when generating patch format output. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 655 | </p> |
| 656 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 657 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 658 | --binary |
| 659 | </dt> |
| 660 | <dd> |
| 661 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 662 | In addition to <tt>--full-index</tt>, output a binary diff that |
| 663 | can be applied with <tt>git-apply</tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 664 | </p> |
| 665 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 666 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 667 | --abbrev[=<n>] |
| 668 | </dt> |
| 669 | <dd> |
| 670 | <p> |
| 671 | Instead of showing the full 40-byte hexadecimal object |
| 672 | name in diff-raw format output and diff-tree header |
Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 673 | lines, show only a partial prefix. This is |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 674 | independent of the <tt>--full-index</tt> option above, which controls |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 675 | the diff-patch output format. Non default number of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 676 | digits can be specified with <tt>--abbrev=<n></tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 677 | </p> |
| 678 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 679 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 680 | -B[<n>][/<m>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 681 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 682 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 683 | --break-rewrites[=[<n>][/<m>]] |
| 684 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 685 | <dd> |
| 686 | <p> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 687 | Break complete rewrite changes into pairs of delete and |
| 688 | create. This serves two purposes: |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 689 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 690 | <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] | 691 | not as a series of deletion and insertion mixed together with a very |
| 692 | few lines that happen to match textually as the context, but as a |
| 693 | single deletion of everything old followed by a single insertion of |
| 694 | everything new, and the number <tt>m</tt> controls this aspect of the -B |
| 695 | option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the |
| 696 | original should remain in the result for git to consider it a total |
| 697 | rewrite (i.e. otherwise the resulting patch will be a series of |
| 698 | deletion and insertion mixed together with context lines).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 699 | <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] | 700 | source of a rename (usually -M only considers a file that disappeared |
| 701 | as the source of a rename), and the number <tt>n</tt> controls this aspect of |
| 702 | the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 703 | 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] | 704 | eligible for being picked up as a possible source of a rename to |
| 705 | another file.</p></div> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 706 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 707 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 708 | -M[<n>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 709 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 710 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 711 | --find-renames[=<n>] |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 712 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 713 | <dd> |
| 714 | <p> |
| 715 | Detect renames. |
Junio C Hamano | 5f2627d | 2011-05-06 20:23:48 | [diff] [blame] | 716 | If <tt>n</tt> is specified, it is a threshold on the similarity |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 717 | index (i.e. amount of addition/deletions compared to the |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 718 | file’s size). For example, <tt>-M90%</tt> means git should consider a |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 719 | delete/add pair to be a rename if more than 90% of the file |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 720 | hasn’t changed. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 721 | </p> |
| 722 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 723 | <dt class="hdlist1"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 724 | -C[<n>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 725 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 726 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 727 | --find-copies[=<n>] |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 728 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 729 | <dd> |
| 730 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 731 | Detect copies as well as renames. See also <tt>--find-copies-harder</tt>. |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 732 | If <tt>n</tt> is specified, it has the same meaning as for <tt>-M<n></tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 733 | </p> |
| 734 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 735 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 736 | --find-copies-harder |
| 737 | </dt> |
| 738 | <dd> |
| 739 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 740 | For performance reasons, by default, <tt>-C</tt> option finds copies only |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 741 | if the original file of the copy was modified in the same |
| 742 | changeset. This flag makes the command |
| 743 | inspect unmodified files as candidates for the source of |
| 744 | copy. This is a very expensive operation for large |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 745 | projects, so use it with caution. Giving more than one |
| 746 | <tt>-C</tt> option has the same effect. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 747 | </p> |
| 748 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 749 | <dt class="hdlist1"> |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 750 | -D |
| 751 | </dt> |
| 752 | <dt class="hdlist1"> |
| 753 | --irreversible-delete |
| 754 | </dt> |
| 755 | <dd> |
| 756 | <p> |
| 757 | Omit the preimage for deletes, i.e. print only the header but not |
| 758 | the diff between the preimage and <tt>/dev/null</tt>. The resulting patch |
| 759 | is not meant to be applied with <tt>patch</tt> nor <tt>git apply</tt>; this is |
| 760 | solely for people who want to just concentrate on reviewing the |
| 761 | text after the change. In addition, the output obviously lack |
| 762 | enough information to apply such a patch in reverse, even manually, |
| 763 | hence the name of the option. |
| 764 | </p> |
| 765 | <div class="paragraph"><p>When used together with <tt>-B</tt>, omit also the preimage in the deletion part |
| 766 | of a delete/create pair.</p></div> |
| 767 | </dd> |
| 768 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 769 | -l<num> |
| 770 | </dt> |
| 771 | <dd> |
| 772 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 773 | The <tt>-M</tt> and <tt>-C</tt> options require O(n^2) processing time where n |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 774 | is the number of potential rename/copy targets. This |
| 775 | option prevents rename/copy detection from running if |
| 776 | the number of rename/copy targets exceeds the specified |
| 777 | number. |
| 778 | </p> |
| 779 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 780 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 781 | -O<orderfile> |
| 782 | </dt> |
| 783 | <dd> |
| 784 | <p> |
| 785 | Output the patch in the order specified in the |
| 786 | <orderfile>, which has one shell glob pattern per line. |
| 787 | </p> |
| 788 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 789 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 790 | -a |
| 791 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 792 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 793 | --text |
| 794 | </dt> |
| 795 | <dd> |
| 796 | <p> |
| 797 | Treat all files as text. |
| 798 | </p> |
| 799 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 800 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 801 | --ignore-space-at-eol |
| 802 | </dt> |
| 803 | <dd> |
| 804 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 805 | Ignore changes in whitespace at EOL. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 806 | </p> |
| 807 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 808 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 809 | -b |
| 810 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 811 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 812 | --ignore-space-change |
| 813 | </dt> |
| 814 | <dd> |
| 815 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 816 | Ignore changes in amount of whitespace. This ignores whitespace |
| 817 | at line end, and considers all other sequences of one or |
| 818 | more whitespace characters to be equivalent. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 819 | </p> |
| 820 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 821 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 822 | -w |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 823 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 824 | <dt class="hdlist1"> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 825 | --ignore-all-space |
| 826 | </dt> |
| 827 | <dd> |
| 828 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 829 | Ignore whitespace when comparing lines. This ignores |
| 830 | differences even if one line has whitespace where the other |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 831 | line has none. |
| 832 | </p> |
| 833 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 834 | <dt class="hdlist1"> |
Junio C Hamano | 1d40ee8 | 2009-01-07 10:14:16 | [diff] [blame] | 835 | --inter-hunk-context=<lines> |
| 836 | </dt> |
| 837 | <dd> |
| 838 | <p> |
| 839 | Show the context between diff hunks, up to the specified number |
| 840 | of lines, thereby fusing hunks that are close to each other. |
| 841 | </p> |
| 842 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 843 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 844 | --ext-diff |
| 845 | </dt> |
| 846 | <dd> |
| 847 | <p> |
| 848 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 849 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 850 | 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] | 851 | </p> |
| 852 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 853 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 854 | --no-ext-diff |
| 855 | </dt> |
| 856 | <dd> |
| 857 | <p> |
| 858 | Disallow external diff drivers. |
| 859 | </p> |
| 860 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 861 | <dt class="hdlist1"> |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame^] | 862 | --textconv |
| 863 | </dt> |
| 864 | <dt class="hdlist1"> |
| 865 | --no-textconv |
| 866 | </dt> |
| 867 | <dd> |
| 868 | <p> |
| 869 | Allow (or disallow) external text conversion filters to be run |
| 870 | when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for |
| 871 | details. Because textconv filters are typically a one-way |
| 872 | conversion, the resulting diff is suitable for human |
| 873 | consumption, but cannot be applied. For this reason, textconv |
| 874 | filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and |
| 875 | <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or |
| 876 | diff plumbing commands. |
| 877 | </p> |
| 878 | </dd> |
| 879 | <dt class="hdlist1"> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 880 | --ignore-submodules[=<when>] |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 881 | </dt> |
| 882 | <dd> |
| 883 | <p> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 884 | Ignore changes to submodules in the diff generation. <when> can be |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 885 | either "none", "untracked", "dirty" or "all", which is the default |
| 886 | Using "none" will consider the submodule modified when it either contains |
| 887 | untracked or modified files or its HEAD differs from the commit recorded |
| 888 | in the superproject and can be used to override any settings of the |
| 889 | <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] | 890 | "untracked" is used submodules are not considered dirty when they only |
| 891 | contain untracked content (but they are still scanned for modified |
| 892 | content). Using "dirty" ignores all changes to the work tree of submodules, |
| 893 | only changes to the commits stored in the superproject are shown (this was |
| 894 | 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] | 895 | </p> |
| 896 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 897 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 898 | --src-prefix=<prefix> |
| 899 | </dt> |
| 900 | <dd> |
| 901 | <p> |
| 902 | Show the given source prefix instead of "a/". |
| 903 | </p> |
| 904 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 905 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 906 | --dst-prefix=<prefix> |
| 907 | </dt> |
| 908 | <dd> |
| 909 | <p> |
| 910 | Show the given destination prefix instead of "b/". |
| 911 | </p> |
| 912 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 913 | <dt class="hdlist1"> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 914 | --no-prefix |
| 915 | </dt> |
| 916 | <dd> |
| 917 | <p> |
| 918 | Do not show any source or destination prefix. |
| 919 | </p> |
| 920 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 921 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 922 | <div class="paragraph"><p>For more detailed explanation on these common options, see also |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 923 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 924 | <div class="dlist"><dl> |
| 925 | <dt class="hdlist1"> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 926 | -<n> |
| 927 | </dt> |
| 928 | <dd> |
| 929 | <p> |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 930 | Prepare patches from the topmost <n> commits. |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 931 | </p> |
| 932 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 933 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 934 | -o <dir> |
| 935 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 936 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 937 | --output-directory <dir> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 938 | </dt> |
| 939 | <dd> |
| 940 | <p> |
| 941 | Use <dir> to store the resulting files, instead of the |
Junio C Hamano | 1bab4b0 | 2006-06-06 21:58:33 | [diff] [blame] | 942 | current working directory. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 943 | </p> |
| 944 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 945 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 946 | -n |
| 947 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 948 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 949 | --numbered |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 950 | </dt> |
| 951 | <dd> |
| 952 | <p> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 953 | 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] | 954 | </p> |
| 955 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 956 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 957 | -N |
| 958 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 959 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 960 | --no-numbered |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 961 | </dt> |
| 962 | <dd> |
| 963 | <p> |
| 964 | Name output in <em>[PATCH]</em> format. |
| 965 | </p> |
| 966 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 967 | <dt class="hdlist1"> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 968 | --start-number <n> |
| 969 | </dt> |
| 970 | <dd> |
| 971 | <p> |
| 972 | Start numbering the patches at <n> instead of 1. |
| 973 | </p> |
| 974 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 975 | <dt class="hdlist1"> |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 976 | --numbered-files |
| 977 | </dt> |
| 978 | <dd> |
| 979 | <p> |
| 980 | Output file names will be a simple number sequence |
| 981 | without the default first line of the commit appended. |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 982 | </p> |
| 983 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 984 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 985 | -k |
| 986 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 987 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 988 | --keep-subject |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 989 | </dt> |
| 990 | <dd> |
| 991 | <p> |
| 992 | Do not strip/add <em>[PATCH]</em> from the first line of the |
| 993 | commit log message. |
| 994 | </p> |
| 995 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 996 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 997 | -s |
| 998 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 999 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1000 | --signoff |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1001 | </dt> |
| 1002 | <dd> |
| 1003 | <p> |
| 1004 | Add <tt>Signed-off-by:</tt> line to the commit message, using |
| 1005 | the committer identity of yourself. |
| 1006 | </p> |
| 1007 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1008 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1009 | --stdout |
| 1010 | </dt> |
| 1011 | <dd> |
| 1012 | <p> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 1013 | Print all commits to the standard output in mbox format, |
| 1014 | instead of creating a file for each one. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1015 | </p> |
| 1016 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1017 | <dt class="hdlist1"> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1018 | --attach[=<boundary>] |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1019 | </dt> |
| 1020 | <dd> |
| 1021 | <p> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1022 | Create multipart/mixed attachment, the first part of |
| 1023 | which is the commit message and the patch itself in the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1024 | second part, with <tt>Content-Disposition: attachment</tt>. |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1025 | </p> |
| 1026 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1027 | <dt class="hdlist1"> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 1028 | --no-attach |
| 1029 | </dt> |
| 1030 | <dd> |
| 1031 | <p> |
| 1032 | Disable the creation of an attachment, overriding the |
| 1033 | configuration setting. |
| 1034 | </p> |
| 1035 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1036 | <dt class="hdlist1"> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 1037 | --inline[=<boundary>] |
| 1038 | </dt> |
| 1039 | <dd> |
| 1040 | <p> |
| 1041 | Create multipart/mixed attachment, the first part of |
| 1042 | which is the commit message and the patch itself in the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1043 | second part, with <tt>Content-Disposition: inline</tt>. |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1044 | </p> |
| 1045 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1046 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 1047 | --thread[=<style>] |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1048 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1049 | <dt class="hdlist1"> |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1050 | --no-thread |
| 1051 | </dt> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1052 | <dd> |
| 1053 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1054 | Controls addition of <tt>In-Reply-To</tt> and <tt>References</tt> headers to |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1055 | make the second and subsequent mails appear as replies to the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1056 | first. Also controls generation of the <tt>Message-Id</tt> header to |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1057 | reference. |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1058 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1059 | <div class="paragraph"><p>The optional <style> argument can be either <tt>shallow</tt> or <tt>deep</tt>. |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1060 | <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] | 1061 | series, where the head is chosen from the cover letter, the |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1062 | <tt>--in-reply-to</tt>, and the first patch mail, in this order. <em>deep</em> |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1063 | threading makes every mail a reply to the previous one.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1064 | <div class="paragraph"><p>The default is <tt>--no-thread</tt>, unless the <em>format.thread</em> configuration |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1065 | is set. If <tt>--thread</tt> is specified without a style, it defaults to the |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 1066 | style specified by <em>format.thread</em> if any, or else <tt>shallow</tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1067 | <div class="paragraph"><p>Beware that the default for <em>git send-email</em> is to thread emails |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1068 | itself. If you want <tt>git format-patch</tt> to take care of threading, you |
| 1069 | will want to ensure that threading is disabled for <tt>git send-email</tt>.</p></div> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1070 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1071 | <dt class="hdlist1"> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1072 | --in-reply-to=Message-Id |
| 1073 | </dt> |
| 1074 | <dd> |
| 1075 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1076 | Make the first mail (or all the mails with <tt>--no-thread</tt>) appear as a |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 1077 | reply to the given Message-Id, which avoids breaking threads to |
| 1078 | provide a new patch series. |
| 1079 | </p> |
| 1080 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1081 | <dt class="hdlist1"> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1082 | --ignore-if-in-upstream |
| 1083 | </dt> |
| 1084 | <dd> |
| 1085 | <p> |
| 1086 | Do not include a patch that matches a commit in |
| 1087 | <until>..<since>. This will examine all patches reachable |
| 1088 | from <since> but not from <until> and compare them with the |
| 1089 | patches being generated, and any patch that matches is |
| 1090 | ignored. |
| 1091 | </p> |
| 1092 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1093 | <dt class="hdlist1"> |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 1094 | --subject-prefix=<Subject-Prefix> |
| 1095 | </dt> |
| 1096 | <dd> |
| 1097 | <p> |
| 1098 | Instead of the standard <em>[PATCH]</em> prefix in the subject |
| 1099 | line, instead use <em>[<Subject-Prefix>]</em>. This |
| 1100 | allows for useful naming of a patch series, and can be |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1101 | combined with the <tt>--numbered</tt> option. |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 1102 | </p> |
| 1103 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1104 | <dt class="hdlist1"> |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1105 | --to=<email> |
| 1106 | </dt> |
| 1107 | <dd> |
| 1108 | <p> |
| 1109 | Add a <tt>To:</tt> header to the email headers. This is in addition |
| 1110 | to any configured headers, and may be used multiple times. |
| 1111 | </p> |
| 1112 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1113 | <dt class="hdlist1"> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1114 | --cc=<email> |
| 1115 | </dt> |
| 1116 | <dd> |
| 1117 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1118 | Add a <tt>Cc:</tt> header to the email headers. This is in addition |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1119 | to any configured headers, and may be used multiple times. |
| 1120 | </p> |
| 1121 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1122 | <dt class="hdlist1"> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1123 | --add-header=<header> |
| 1124 | </dt> |
| 1125 | <dd> |
| 1126 | <p> |
| 1127 | Add an arbitrary header to the email headers. This is in addition |
| 1128 | to any configured headers, and may be used multiple times. |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1129 | For example, <tt>--add-header="Organization: git-foo"</tt> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1130 | </p> |
| 1131 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1132 | <dt class="hdlist1"> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1133 | --cover-letter |
| 1134 | </dt> |
| 1135 | <dd> |
| 1136 | <p> |
Junio C Hamano | 92a4abd | 2008-08-15 05:34:44 | [diff] [blame] | 1137 | In addition to the patches, generate a cover letter file |
| 1138 | containing the shortlog and the overall diffstat. You can |
| 1139 | fill in a description in the file before sending it out. |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1140 | </p> |
| 1141 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1142 | <dt class="hdlist1"> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1143 | --[no]-signature=<signature> |
| 1144 | </dt> |
| 1145 | <dd> |
| 1146 | <p> |
| 1147 | Add a signature to each message produced. Per RFC 3676 the signature |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1148 | is separated from the body by a line with '-- ' on it. If the |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1149 | signature option is omitted the signature defaults to the git version |
| 1150 | number. |
| 1151 | </p> |
| 1152 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1153 | <dt class="hdlist1"> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1154 | --suffix=.<sfx> |
| 1155 | </dt> |
| 1156 | <dd> |
| 1157 | <p> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1158 | Instead of using <tt>.patch</tt> as the suffix for generated |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 1159 | filenames, use specified suffix. A common alternative is |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1160 | <tt>--suffix=.txt</tt>. Leaving this empty will remove the <tt>.patch</tt> |
| 1161 | suffix. |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1162 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1163 | <div class="paragraph"><p>Note that the leading character does not have to be a dot; for example, |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1164 | you can use <tt>--suffix=-patch</tt> to get <tt>0001-description-of-my-change-patch</tt>.</p></div> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1165 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1166 | <dt class="hdlist1"> |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 1167 | --quiet |
| 1168 | </dt> |
| 1169 | <dd> |
| 1170 | <p> |
| 1171 | Do not print the names of the generated files to standard output. |
| 1172 | </p> |
| 1173 | </dd> |
| 1174 | <dt class="hdlist1"> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1175 | --no-binary |
| 1176 | </dt> |
| 1177 | <dd> |
| 1178 | <p> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1179 | Do not output contents of changes in binary files, instead |
| 1180 | display a notice that those files changed. Patches generated |
| 1181 | using this option cannot be applied properly, but they are |
| 1182 | still useful for code review. |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1183 | </p> |
| 1184 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1185 | <dt class="hdlist1"> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1186 | --root |
| 1187 | </dt> |
| 1188 | <dd> |
| 1189 | <p> |
| 1190 | Treat the revision argument as a <revision range>, even if it |
| 1191 | is just a single commit (that would normally be treated as a |
| 1192 | <since>). Note that root commits included in the specified |
| 1193 | range are always formatted as creation patches, independently |
| 1194 | of this flag. |
| 1195 | </p> |
| 1196 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1197 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1198 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1199 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1200 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1201 | <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] | 1202 | defaults for the subject prefix and file suffix, number patches when |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1203 | outputting more than one patch, add "To" or "Cc:" headers, configure |
| 1204 | attachments, and sign off patches with configuration variables.</p></div> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1205 | <div class="listingblock"> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1206 | <div class="content"> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1207 | <pre><tt>[format] |
| 1208 | headers = "Organization: git-foo\n" |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1209 | subjectprefix = CHANGE |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 1210 | suffix = .txt |
Junio C Hamano | 2fbcd21 | 2008-05-14 22:26:07 | [diff] [blame] | 1211 | numbered = auto |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1212 | to = <email> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 1213 | cc = <email> |
Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 1214 | attach [ = mime-boundary-string ] |
| 1215 | signoff = true</tt></pre> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1216 | </div></div> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1217 | </div> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1218 | <h2 id="_discussion">DISCUSSION</h2> |
| 1219 | <div class="sectionbody"> |
| 1220 | <div class="paragraph"><p>The patch produced by <em>git format-patch</em> is in UNIX mailbox format, |
| 1221 | with a fixed "magic" time stamp to indicate that the file is output |
| 1222 | from format-patch rather than a real mailbox, like so:</p></div> |
| 1223 | <div class="listingblock"> |
| 1224 | <div class="content"> |
| 1225 | <pre><tt>From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001 |
| 1226 | From: Tony Luck <tony.luck@intel.com> |
| 1227 | Date: Tue, 13 Jul 2010 11:42:54 -0700 |
| 1228 | Subject: [PATCH] =?UTF-8?q?[IA64]=20Put=20ia64=20config=20files=20on=20the=20?= |
| 1229 | =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?= |
| 1230 | MIME-Version: 1.0 |
| 1231 | Content-Type: text/plain; charset=UTF-8 |
| 1232 | Content-Transfer-Encoding: 8bit |
| 1233 | |
| 1234 | arch/arm config files were slimmed down using a python script |
| 1235 | (See commit c2330e286f68f1c408b4aa6515ba49d57f05beae comment) |
| 1236 | |
| 1237 | Do the same for ia64 so we can have sleek & trim looking |
| 1238 | ...</tt></pre> |
| 1239 | </div></div> |
| 1240 | <div class="paragraph"><p>Typically it will be placed in a MUA’s drafts folder, edited to add |
| 1241 | timely commentary that should not go in the changelog after the three |
| 1242 | dashes, and then sent as a message whose body, in our example, starts |
| 1243 | with "arch/arm config files were…". On the receiving end, readers |
| 1244 | can save interesting patches in a UNIX mailbox and apply them with |
| 1245 | <a href="git-am.html">git-am(1)</a>.</p></div> |
| 1246 | <div class="paragraph"><p>When a patch is part of an ongoing discussion, the patch generated by |
| 1247 | <em>git format-patch</em> can be tweaked to take advantage of the <em>git am |
| 1248 | --scissors</em> feature. After your response to the discussion comes a |
| 1249 | line that consists solely of "<tt>-- >8 --</tt>" (scissors and perforation), |
| 1250 | followed by the patch with unnecessary header fields removed:</p></div> |
| 1251 | <div class="listingblock"> |
| 1252 | <div class="content"> |
| 1253 | <pre><tt>... |
| 1254 | > So we should do such-and-such. |
| 1255 | |
| 1256 | Makes sense to me. How about this patch? |
| 1257 | |
| 1258 | -- >8 -- |
| 1259 | Subject: [IA64] Put ia64 config files on the Uwe Kleine-König diet |
| 1260 | |
| 1261 | arch/arm config files were slimmed down using a python script |
| 1262 | ...</tt></pre> |
| 1263 | </div></div> |
| 1264 | <div class="paragraph"><p>When sending a patch this way, most often you are sending your own |
| 1265 | patch, so in addition to the "<tt>From $SHA1 $magic_timestamp</tt>" marker you |
| 1266 | should omit <tt>From:</tt> and <tt>Date:</tt> lines from the patch file. The patch |
| 1267 | title is likely to be different from the subject of the discussion the |
| 1268 | patch is in response to, so it is likely that you would want to keep |
| 1269 | the Subject: line, like the example above.</p></div> |
| 1270 | <h3 id="_checking_for_patch_corruption">Checking for patch corruption</h3><div style="clear:left"></div> |
| 1271 | <div class="paragraph"><p>Many mailers if not set up properly will corrupt whitespace. Here are |
| 1272 | two common types of corruption:</p></div> |
| 1273 | <div class="ulist"><ul> |
| 1274 | <li> |
| 1275 | <p> |
| 1276 | Empty context lines that do not have <em>any</em> whitespace. |
| 1277 | </p> |
| 1278 | </li> |
| 1279 | <li> |
| 1280 | <p> |
| 1281 | Non-empty context lines that have one extra whitespace at the |
| 1282 | beginning. |
| 1283 | </p> |
| 1284 | </li> |
| 1285 | </ul></div> |
| 1286 | <div class="paragraph"><p>One way to test if your MUA is set up correctly is:</p></div> |
| 1287 | <div class="ulist"><ul> |
| 1288 | <li> |
| 1289 | <p> |
| 1290 | Send the patch to yourself, exactly the way you would, except |
| 1291 | with To: and Cc: lines that do not contain the list and |
| 1292 | maintainer address. |
| 1293 | </p> |
| 1294 | </li> |
| 1295 | <li> |
| 1296 | <p> |
| 1297 | Save that patch to a file in UNIX mailbox format. Call it a.patch, |
| 1298 | say. |
| 1299 | </p> |
| 1300 | </li> |
| 1301 | <li> |
| 1302 | <p> |
| 1303 | Apply it: |
| 1304 | </p> |
| 1305 | <div class="literalblock"> |
| 1306 | <div class="content"> |
| 1307 | <pre><tt>$ git fetch <project> master:test-apply |
| 1308 | $ git checkout test-apply |
| 1309 | $ git reset --hard |
| 1310 | $ git am a.patch</tt></pre> |
| 1311 | </div></div> |
| 1312 | </li> |
| 1313 | </ul></div> |
| 1314 | <div class="paragraph"><p>If it does not apply correctly, there can be various reasons.</p></div> |
| 1315 | <div class="ulist"><ul> |
| 1316 | <li> |
| 1317 | <p> |
| 1318 | The patch itself does not apply cleanly. That is <em>bad</em> but |
| 1319 | does not have much to do with your MUA. You might want to rebase |
| 1320 | the patch with <a href="git-rebase.html">git-rebase(1)</a> before regenerating it in |
| 1321 | this case. |
| 1322 | </p> |
| 1323 | </li> |
| 1324 | <li> |
| 1325 | <p> |
| 1326 | The MUA corrupted your patch; "am" would complain that |
| 1327 | the patch does not apply. Look in the .git/rebase-apply/ subdirectory and |
| 1328 | see what <em>patch</em> file contains and check for the common |
| 1329 | corruption patterns mentioned above. |
| 1330 | </p> |
| 1331 | </li> |
| 1332 | <li> |
| 1333 | <p> |
| 1334 | While at it, check the <em>info</em> and <em>final-commit</em> files as well. |
| 1335 | If what is in <em>final-commit</em> is not exactly what you would want to |
| 1336 | see in the commit log message, it is very likely that the |
| 1337 | receiver would end up hand editing the log message when applying |
| 1338 | your patch. Things like "Hi, this is my first patch.\n" in the |
| 1339 | patch e-mail should come after the three-dash line that signals |
| 1340 | the end of the commit message. |
| 1341 | </p> |
| 1342 | </li> |
| 1343 | </ul></div> |
| 1344 | </div> |
| 1345 | <h2 id="_mua_specific_hints">MUA-SPECIFIC HINTS</h2> |
| 1346 | <div class="sectionbody"> |
| 1347 | <div class="paragraph"><p>Here are some hints on how to successfully submit patches inline using |
| 1348 | various mailers.</p></div> |
| 1349 | <h3 id="_gmail">GMail</h3><div style="clear:left"></div> |
| 1350 | <div class="paragraph"><p>GMail does not have any way to turn off line wrapping in the web |
| 1351 | interface, so it will mangle any emails that you send. You can however |
| 1352 | use "git send-email" and send your patches through the GMail SMTP server, or |
| 1353 | use any IMAP email client to connect to the google IMAP server and forward |
| 1354 | the emails through that.</p></div> |
| 1355 | <div class="paragraph"><p>For hints on using <em>git send-email</em> to send your patches through the |
| 1356 | GMail SMTP server, see the EXAMPLE section of <a href="git-send-email.html">git-send-email(1)</a>.</p></div> |
| 1357 | <div class="paragraph"><p>For hints on submission using the IMAP interface, see the EXAMPLE |
| 1358 | section of <a href="git-imap-send.html">git-imap-send(1)</a>.</p></div> |
| 1359 | <h3 id="_thunderbird">Thunderbird</h3><div style="clear:left"></div> |
| 1360 | <div class="paragraph"><p>By default, Thunderbird will both wrap emails as well as flag |
| 1361 | them as being <em>format=flowed</em>, both of which will make the |
| 1362 | resulting email unusable by git.</p></div> |
| 1363 | <div class="paragraph"><p>There are three different approaches: use an add-on to turn off line wraps, |
| 1364 | configure Thunderbird to not mangle patches, or use |
| 1365 | an external editor to keep Thunderbird from mangling the patches.</p></div> |
| 1366 | <h4 id="_approach_1_add_on">Approach #1 (add-on)</h4> |
| 1367 | <div class="paragraph"><p>Install the Toggle Word Wrap add-on that is available from |
| 1368 | <a href="https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/">https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/</a> |
| 1369 | It adds a menu entry "Enable Word Wrap" in the composer’s "Options" menu |
| 1370 | that you can tick off. Now you can compose the message as you otherwise do |
| 1371 | (cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc), but you have to |
| 1372 | insert line breaks manually in any text that you type.</p></div> |
| 1373 | <h4 id="_approach_2_configuration">Approach #2 (configuration)</h4> |
| 1374 | <div class="paragraph"><p>Three steps:</p></div> |
| 1375 | <div class="olist arabic"><ol class="arabic"> |
| 1376 | <li> |
| 1377 | <p> |
| 1378 | Configure your mail server composition as plain text: |
| 1379 | Edit…Account Settings…Composition & Addressing, |
| 1380 | uncheck "Compose Messages in HTML". |
| 1381 | </p> |
| 1382 | </li> |
| 1383 | <li> |
| 1384 | <p> |
| 1385 | Configure your general composition window to not wrap. |
| 1386 | </p> |
| 1387 | <div class="paragraph"><p>In Thunderbird 2: |
| 1388 | Edit..Preferences..Composition, wrap plain text messages at 0</p></div> |
| 1389 | <div class="paragraph"><p>In Thunderbird 3: |
| 1390 | Edit..Preferences..Advanced..Config Editor. Search for |
| 1391 | "mail.wrap_long_lines". |
| 1392 | Toggle it to make sure it is set to <tt>false</tt>.</p></div> |
| 1393 | </li> |
| 1394 | <li> |
| 1395 | <p> |
| 1396 | Disable the use of format=flowed: |
| 1397 | Edit..Preferences..Advanced..Config Editor. Search for |
| 1398 | "mailnews.send_plaintext_flowed". |
| 1399 | Toggle it to make sure it is set to <tt>false</tt>. |
| 1400 | </p> |
| 1401 | </li> |
| 1402 | </ol></div> |
| 1403 | <div class="paragraph"><p>After that is done, you should be able to compose email as you |
| 1404 | otherwise would (cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc), |
| 1405 | and the patches will not be mangled.</p></div> |
| 1406 | <h4 id="_approach_3_external_editor">Approach #3 (external editor)</h4> |
| 1407 | <div class="paragraph"><p>The following Thunderbird extensions are needed: |
| 1408 | AboutConfig from <a href="http://aboutconfig.mozdev.org/">http://aboutconfig.mozdev.org/</a> and |
| 1409 | 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> |
| 1410 | <div class="olist arabic"><ol class="arabic"> |
| 1411 | <li> |
| 1412 | <p> |
| 1413 | Prepare the patch as a text file using your method of choice. |
| 1414 | </p> |
| 1415 | </li> |
| 1416 | <li> |
| 1417 | <p> |
| 1418 | Before opening a compose window, use Edit→Account Settings to |
| 1419 | uncheck the "Compose messages in HTML format" setting in the |
| 1420 | "Composition & Addressing" panel of the account to be used to |
| 1421 | send the patch. |
| 1422 | </p> |
| 1423 | </li> |
| 1424 | <li> |
| 1425 | <p> |
| 1426 | In the main Thunderbird window, <em>before</em> you open the compose |
| 1427 | window for the patch, use Tools→about:config to set the |
| 1428 | following to the indicated values: |
| 1429 | </p> |
| 1430 | <div class="listingblock"> |
| 1431 | <div class="content"> |
| 1432 | <pre><tt> mailnews.send_plaintext_flowed => false |
| 1433 | mailnews.wraplength => 0</tt></pre> |
| 1434 | </div></div> |
| 1435 | </li> |
| 1436 | <li> |
| 1437 | <p> |
| 1438 | Open a compose window and click the external editor icon. |
| 1439 | </p> |
| 1440 | </li> |
| 1441 | <li> |
| 1442 | <p> |
| 1443 | In the external editor window, read in the patch file and exit |
| 1444 | the editor normally. |
| 1445 | </p> |
| 1446 | </li> |
| 1447 | </ol></div> |
| 1448 | <div class="paragraph"><p>Side note: it may be possible to do step 2 with |
| 1449 | about:config and the following settings but no one’s tried yet.</p></div> |
| 1450 | <div class="listingblock"> |
| 1451 | <div class="content"> |
| 1452 | <pre><tt> mail.html_compose => false |
| 1453 | mail.identity.default.compose_html => false |
| 1454 | mail.identity.id?.compose_html => false</tt></pre> |
| 1455 | </div></div> |
| 1456 | <div class="paragraph"><p>There is a script in contrib/thunderbird-patch-inline which can help |
| 1457 | you include patches with Thunderbird in an easy way. To use it, do the |
| 1458 | steps above and then use the script as the external editor.</p></div> |
| 1459 | <h3 id="_kmail">KMail</h3><div style="clear:left"></div> |
| 1460 | <div class="paragraph"><p>This should help you to submit patches inline using KMail.</p></div> |
| 1461 | <div class="olist arabic"><ol class="arabic"> |
| 1462 | <li> |
| 1463 | <p> |
| 1464 | Prepare the patch as a text file. |
| 1465 | </p> |
| 1466 | </li> |
| 1467 | <li> |
| 1468 | <p> |
| 1469 | Click on New Mail. |
| 1470 | </p> |
| 1471 | </li> |
| 1472 | <li> |
| 1473 | <p> |
| 1474 | Go under "Options" in the Composer window and be sure that |
| 1475 | "Word wrap" is not set. |
| 1476 | </p> |
| 1477 | </li> |
| 1478 | <li> |
| 1479 | <p> |
| 1480 | Use Message → Insert file… and insert the patch. |
| 1481 | </p> |
| 1482 | </li> |
| 1483 | <li> |
| 1484 | <p> |
| 1485 | Back in the compose window: add whatever other text you wish to the |
| 1486 | message, complete the addressing and subject fields, and press send. |
| 1487 | </p> |
| 1488 | </li> |
| 1489 | </ol></div> |
| 1490 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1491 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1492 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1493 | <div class="ulist"><ul> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1494 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1495 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1496 | 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] | 1497 | the current branch using <em>git am</em> to cherry-pick them: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1498 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1499 | <div class="listingblock"> |
| 1500 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1501 | <pre><tt>$ git format-patch -k --stdout R1..R2 | git am -3 -k</tt></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1502 | </div></div> |
| 1503 | </li> |
| 1504 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1505 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1506 | Extract all commits which are in the current branch but not in the |
| 1507 | origin branch: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1508 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1509 | <div class="listingblock"> |
| 1510 | <div class="content"> |
| 1511 | <pre><tt>$ git format-patch origin</tt></pre> |
| 1512 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1513 | <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] | 1514 | </li> |
| 1515 | <li> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1516 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1517 | Extract all commits that lead to <em>origin</em> since the inception of the |
| 1518 | project: |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1519 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1520 | <div class="listingblock"> |
| 1521 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1522 | <pre><tt>$ git format-patch --root origin</tt></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1523 | </div></div> |
| 1524 | </li> |
| 1525 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1526 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1527 | The same as the previous one: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1528 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1529 | <div class="listingblock"> |
| 1530 | <div class="content"> |
| 1531 | <pre><tt>$ git format-patch -M -B origin</tt></pre> |
| 1532 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1533 | <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] | 1534 | intelligently to produce a renaming patch. A renaming patch reduces |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1535 | the amount of text output, and generally makes it easier to review. |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1536 | Note that non-git "patch" programs won’t understand renaming patches, so |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1537 | 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] | 1538 | </li> |
| 1539 | <li> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1540 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1541 | Extract three topmost commits from the current branch and format them |
| 1542 | as e-mailable patches: |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1543 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1544 | <div class="listingblock"> |
| 1545 | <div class="content"> |
| 1546 | <pre><tt>$ git format-patch -3</tt></pre> |
| 1547 | </div></div> |
| 1548 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1549 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1550 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1551 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1552 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1553 | <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] | 1554 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1555 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1556 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1557 | <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] | 1558 | </div> |
| 1559 | <div id="footer"> |
| 1560 | <div id="footer-text"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1561 | Last updated 2011-05-05 01:29:54 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1562 | </div> |
| 1563 | </div> |
| 1564 | </body> |
| 1565 | </html> |