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