Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-format-patch(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-format-patch(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-format-patch - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 317 | Prepare patches for e-mail submission |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 323 | <div class="verseblock"> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 324 | <div 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] | 325 | [--no-thread | --thread[=<style>]] |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 326 | [(--attach|--inline)[=<boundary>] | --no-attach] |
| 327 | [-s | --signoff] |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 328 | [--signature=<signature> | --no-signature] |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 329 | [-n | --numbered | -N | --no-numbered] |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 330 | [--start-number <n>] [--numbered-files] |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 331 | [--in-reply-to=Message-Id] [--suffix=.<sfx>] |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 332 | [--ignore-if-in-upstream] |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 333 | [--subject-prefix=Subject-Prefix] |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 334 | [--to=<email>] [--cc=<email>] |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 335 | [--cover-letter] |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 336 | [<common diff options>] |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 337 | [ <since> | <revision range> ]</div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 338 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 340 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 341 | <div class="para"><p>Prepare each commit with its patch in |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 342 | one file per commit, formatted to resemble UNIX mailbox format. |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 343 | The output of this command is convenient for e-mail submission or |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 344 | for use with <em>git am</em>.</p></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 345 | <div class="para"><p>There are two ways to specify which commits to operate on.</p></div> |
| 346 | <div class="olist"><ol> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 347 | <li> |
| 348 | <p> |
| 349 | A single commit, <since>, specifies that the commits leading |
| 350 | to the tip of the current branch that are not in the history |
| 351 | that leads to the <since> to be output. |
| 352 | </p> |
| 353 | </li> |
| 354 | <li> |
| 355 | <p> |
| 356 | Generic <revision range> expression (see "SPECIFYING |
| 357 | REVISIONS" section in <a href="git-rev-parse.html">git-rev-parse(1)</a>) means the |
| 358 | commits in the specified range. |
| 359 | </p> |
| 360 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 361 | </ol></div> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 362 | <div class="para"><p>The first rule takes precedence in the case of a single <commit>. To |
| 363 | apply the second rule, i.e., format everything since the beginning of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 364 | history up until <commit>, use the <em>--root</em> option: <tt>git format-patch |
| 365 | --root <commit></tt>. If you want to format only <commit> itself, you |
| 366 | can do this with <tt>git format-patch -1 <commit></tt>.</p></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 367 | <div class="para"><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] | 368 | first line of the commit message (massaged for pathname safety) as |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 369 | 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] | 370 | will only be numbers, without the first line of the commit appended. |
| 371 | The names of the output files are printed to standard |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 372 | output, unless the <tt>--stdout</tt> option is specified.</p></div> |
| 373 | <div class="para"><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] | 374 | they are created in the current working directory.</p></div> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 375 | <div class="para"><p>By default, the subject of a single patch is "[PATCH] First Line" and |
| 376 | the subject when multiple patches are output is "[PATCH n/m] First |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 377 | Line". To force 1/1 to be added for a single patch, use <tt>-n</tt>. To omit |
| 378 | patch numbers from the subject, use <tt>-N</tt>.</p></div> |
| 379 | <div class="para"><p>If given <tt>--thread</tt>, <tt>git-format-patch</tt> will generate <tt>In-Reply-To</tt> and |
| 380 | <tt>References</tt> headers to make the second and subsequent patch mails appear |
| 381 | 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] | 382 | reference.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 383 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 384 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 385 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 386 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 387 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 388 | -p |
| 389 | </dt> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 390 | <dt> |
| 391 | --no-stat |
| 392 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 393 | <dd> |
| 394 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 395 | Generate plain patches without any diffstats. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 396 | </p> |
| 397 | </dd> |
| 398 | <dt> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 399 | -U<n> |
| 400 | </dt> |
Junio C Hamano | 6936156 | 2007-07-26 02:14:34 | [diff] [blame] | 401 | <dt> |
| 402 | --unified=<n> |
| 403 | </dt> |
| 404 | <dd> |
| 405 | <p> |
| 406 | Generate diffs with <n> lines of context instead of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 407 | the usual three. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 408 | </p> |
| 409 | </dd> |
Junio C Hamano | 20d47e3 | 2009-01-26 06:36:02 | [diff] [blame] | 410 | <dt> |
| 411 | --patience |
| 412 | </dt> |
| 413 | <dd> |
| 414 | <p> |
| 415 | Generate a diff using the "patience diff" algorithm. |
| 416 | </p> |
| 417 | </dd> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 418 | <dt> |
| 419 | --stat[=width[,name-width]] |
| 420 | </dt> |
| 421 | <dd> |
| 422 | <p> |
| 423 | Generate a diffstat. You can override the default |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 424 | output width for 80-column terminal by <tt>--stat=width</tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 425 | The width of the filename part can be controlled by |
| 426 | giving another width to it separated by a comma. |
| 427 | </p> |
| 428 | </dd> |
| 429 | <dt> |
| 430 | --numstat |
| 431 | </dt> |
| 432 | <dd> |
| 433 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 434 | Similar to <tt>--stat</tt>, but shows number of added and |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 435 | deleted lines in decimal notation and pathname without |
| 436 | abbreviation, to make it more machine friendly. For |
| 437 | binary files, outputs two <tt>-</tt> instead of saying |
| 438 | <tt>0 0</tt>. |
| 439 | </p> |
| 440 | </dd> |
| 441 | <dt> |
| 442 | --shortstat |
| 443 | </dt> |
| 444 | <dd> |
| 445 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 446 | 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] | 447 | number of modified files, as well as number of added and deleted |
| 448 | lines. |
| 449 | </p> |
| 450 | </dd> |
| 451 | <dt> |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 452 | --dirstat[=limit] |
| 453 | </dt> |
| 454 | <dd> |
| 455 | <p> |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 456 | Output the distribution of relative amount of changes (number of lines added or |
| 457 | removed) for each sub-directory. Directories with changes below |
| 458 | a cut-off percent (3% by default) are not shown. The cut-off percent |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 459 | can be set with <tt>--dirstat=limit</tt>. Changes in a child directory is not |
| 460 | counted for the parent directory, unless <tt>--cumulative</tt> is used. |
Junio C Hamano | 6a45be9 | 2008-04-22 08:19:03 | [diff] [blame] | 461 | </p> |
| 462 | </dd> |
| 463 | <dt> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 464 | --dirstat-by-file[=limit] |
| 465 | </dt> |
| 466 | <dd> |
| 467 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 468 | Same as <tt>--dirstat</tt>, but counts changed files instead of lines. |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 469 | </p> |
| 470 | </dd> |
| 471 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 472 | --summary |
| 473 | </dt> |
| 474 | <dd> |
| 475 | <p> |
| 476 | Output a condensed summary of extended header information |
| 477 | such as creations, renames and mode changes. |
| 478 | </p> |
| 479 | </dd> |
| 480 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 481 | --no-renames |
| 482 | </dt> |
| 483 | <dd> |
| 484 | <p> |
| 485 | Turn off rename detection, even when the configuration |
| 486 | file gives the default to do so. |
| 487 | </p> |
| 488 | </dd> |
| 489 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 490 | --full-index |
| 491 | </dt> |
| 492 | <dd> |
| 493 | <p> |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 494 | Instead of the first handful of characters, show the full |
| 495 | pre- and post-image blob object names on the "index" |
| 496 | line when generating patch format output. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 497 | </p> |
| 498 | </dd> |
| 499 | <dt> |
| 500 | --binary |
| 501 | </dt> |
| 502 | <dd> |
| 503 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 504 | In addition to <tt>--full-index</tt>, output a binary diff that |
| 505 | can be applied with <tt>git-apply</tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 506 | </p> |
| 507 | </dd> |
| 508 | <dt> |
| 509 | --abbrev[=<n>] |
| 510 | </dt> |
| 511 | <dd> |
| 512 | <p> |
| 513 | Instead of showing the full 40-byte hexadecimal object |
| 514 | name in diff-raw format output and diff-tree header |
Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 515 | lines, show only a partial prefix. This is |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 516 | independent of the <tt>--full-index</tt> option above, which controls |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 517 | the diff-patch output format. Non default number of |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 518 | digits can be specified with <tt>--abbrev=<n></tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 519 | </p> |
| 520 | </dd> |
| 521 | <dt> |
| 522 | -B |
| 523 | </dt> |
| 524 | <dd> |
| 525 | <p> |
| 526 | Break complete rewrite changes into pairs of delete and create. |
| 527 | </p> |
| 528 | </dd> |
| 529 | <dt> |
| 530 | -M |
| 531 | </dt> |
| 532 | <dd> |
| 533 | <p> |
| 534 | Detect renames. |
| 535 | </p> |
| 536 | </dd> |
| 537 | <dt> |
| 538 | -C |
| 539 | </dt> |
| 540 | <dd> |
| 541 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 542 | Detect copies as well as renames. See also <tt>--find-copies-harder</tt>. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 543 | </p> |
| 544 | </dd> |
| 545 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 546 | --find-copies-harder |
| 547 | </dt> |
| 548 | <dd> |
| 549 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 550 | For performance reasons, by default, <tt>-C</tt> option finds copies only |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 551 | if the original file of the copy was modified in the same |
| 552 | changeset. This flag makes the command |
| 553 | inspect unmodified files as candidates for the source of |
| 554 | copy. This is a very expensive operation for large |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 555 | projects, so use it with caution. Giving more than one |
| 556 | <tt>-C</tt> option has the same effect. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 557 | </p> |
| 558 | </dd> |
| 559 | <dt> |
| 560 | -l<num> |
| 561 | </dt> |
| 562 | <dd> |
| 563 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 564 | 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] | 565 | is the number of potential rename/copy targets. This |
| 566 | option prevents rename/copy detection from running if |
| 567 | the number of rename/copy targets exceeds the specified |
| 568 | number. |
| 569 | </p> |
| 570 | </dd> |
| 571 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 572 | -O<orderfile> |
| 573 | </dt> |
| 574 | <dd> |
| 575 | <p> |
| 576 | Output the patch in the order specified in the |
| 577 | <orderfile>, which has one shell glob pattern per line. |
| 578 | </p> |
| 579 | </dd> |
| 580 | <dt> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 581 | -a |
| 582 | </dt> |
| 583 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 584 | --text |
| 585 | </dt> |
| 586 | <dd> |
| 587 | <p> |
| 588 | Treat all files as text. |
| 589 | </p> |
| 590 | </dd> |
| 591 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 592 | --ignore-space-at-eol |
| 593 | </dt> |
| 594 | <dd> |
| 595 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 596 | Ignore changes in whitespace at EOL. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 597 | </p> |
| 598 | </dd> |
| 599 | <dt> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 600 | -b |
| 601 | </dt> |
| 602 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 603 | --ignore-space-change |
| 604 | </dt> |
| 605 | <dd> |
| 606 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 607 | Ignore changes in amount of whitespace. This ignores whitespace |
| 608 | at line end, and considers all other sequences of one or |
| 609 | more whitespace characters to be equivalent. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 610 | </p> |
| 611 | </dd> |
| 612 | <dt> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 613 | -w |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 614 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 615 | <dt> |
| 616 | --ignore-all-space |
| 617 | </dt> |
| 618 | <dd> |
| 619 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 620 | Ignore whitespace when comparing lines. This ignores |
| 621 | differences even if one line has whitespace where the other |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 622 | line has none. |
| 623 | </p> |
| 624 | </dd> |
| 625 | <dt> |
Junio C Hamano | 1d40ee8 | 2009-01-07 10:14:16 | [diff] [blame] | 626 | --inter-hunk-context=<lines> |
| 627 | </dt> |
| 628 | <dd> |
| 629 | <p> |
| 630 | Show the context between diff hunks, up to the specified number |
| 631 | of lines, thereby fusing hunks that are close to each other. |
| 632 | </p> |
| 633 | </dd> |
| 634 | <dt> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 635 | --ext-diff |
| 636 | </dt> |
| 637 | <dd> |
| 638 | <p> |
| 639 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 640 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 641 | 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] | 642 | </p> |
| 643 | </dd> |
| 644 | <dt> |
| 645 | --no-ext-diff |
| 646 | </dt> |
| 647 | <dd> |
| 648 | <p> |
| 649 | Disallow external diff drivers. |
| 650 | </p> |
| 651 | </dd> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 652 | <dt> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame^] | 653 | --ignore-submodules[=<when>] |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 654 | </dt> |
| 655 | <dd> |
| 656 | <p> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame^] | 657 | Ignore changes to submodules in the diff generation. <when> can be |
| 658 | either "untracked", "dirty" or "all", which is the default. When |
| 659 | "untracked" is used submodules are not considered dirty when they only |
| 660 | contain untracked content (but they are still scanned for modified |
| 661 | content). Using "dirty" ignores all changes to the work tree of submodules, |
| 662 | only changes to the commits stored in the superproject are shown (this was |
| 663 | 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] | 664 | </p> |
| 665 | </dd> |
| 666 | <dt> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 667 | --src-prefix=<prefix> |
| 668 | </dt> |
| 669 | <dd> |
| 670 | <p> |
| 671 | Show the given source prefix instead of "a/". |
| 672 | </p> |
| 673 | </dd> |
| 674 | <dt> |
| 675 | --dst-prefix=<prefix> |
| 676 | </dt> |
| 677 | <dd> |
| 678 | <p> |
| 679 | Show the given destination prefix instead of "b/". |
| 680 | </p> |
| 681 | </dd> |
| 682 | <dt> |
| 683 | --no-prefix |
| 684 | </dt> |
| 685 | <dd> |
| 686 | <p> |
| 687 | Do not show any source or destination prefix. |
| 688 | </p> |
| 689 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 690 | </dl></div> |
| 691 | <div class="para"><p>For more detailed explanation on these common options, see also |
| 692 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
| 693 | <div class="vlist"><dl> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 694 | <dt> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 695 | -<n> |
| 696 | </dt> |
| 697 | <dd> |
| 698 | <p> |
| 699 | Limits the number of patches to prepare. |
| 700 | </p> |
| 701 | </dd> |
| 702 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 703 | -o <dir> |
| 704 | </dt> |
| 705 | <dt> |
| 706 | --output-directory <dir> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 707 | </dt> |
| 708 | <dd> |
| 709 | <p> |
| 710 | Use <dir> to store the resulting files, instead of the |
Junio C Hamano | 1bab4b0 | 2006-06-06 21:58:33 | [diff] [blame] | 711 | current working directory. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 712 | </p> |
| 713 | </dd> |
| 714 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 715 | -n |
| 716 | </dt> |
| 717 | <dt> |
| 718 | --numbered |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 719 | </dt> |
| 720 | <dd> |
| 721 | <p> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 722 | 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] | 723 | </p> |
| 724 | </dd> |
| 725 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 726 | -N |
| 727 | </dt> |
| 728 | <dt> |
| 729 | --no-numbered |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 730 | </dt> |
| 731 | <dd> |
| 732 | <p> |
| 733 | Name output in <em>[PATCH]</em> format. |
| 734 | </p> |
| 735 | </dd> |
| 736 | <dt> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 737 | --start-number <n> |
| 738 | </dt> |
| 739 | <dd> |
| 740 | <p> |
| 741 | Start numbering the patches at <n> instead of 1. |
| 742 | </p> |
| 743 | </dd> |
| 744 | <dt> |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 745 | --numbered-files |
| 746 | </dt> |
| 747 | <dd> |
| 748 | <p> |
| 749 | Output file names will be a simple number sequence |
| 750 | without the default first line of the commit appended. |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 751 | </p> |
| 752 | </dd> |
| 753 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 754 | -k |
| 755 | </dt> |
| 756 | <dt> |
| 757 | --keep-subject |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 758 | </dt> |
| 759 | <dd> |
| 760 | <p> |
| 761 | Do not strip/add <em>[PATCH]</em> from the first line of the |
| 762 | commit log message. |
| 763 | </p> |
| 764 | </dd> |
| 765 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 766 | -s |
| 767 | </dt> |
| 768 | <dt> |
| 769 | --signoff |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 770 | </dt> |
| 771 | <dd> |
| 772 | <p> |
| 773 | Add <tt>Signed-off-by:</tt> line to the commit message, using |
| 774 | the committer identity of yourself. |
| 775 | </p> |
| 776 | </dd> |
| 777 | <dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 778 | --stdout |
| 779 | </dt> |
| 780 | <dd> |
| 781 | <p> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 782 | Print all commits to the standard output in mbox format, |
| 783 | instead of creating a file for each one. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 784 | </p> |
| 785 | </dd> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 786 | <dt> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 787 | --attach[=<boundary>] |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 788 | </dt> |
| 789 | <dd> |
| 790 | <p> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 791 | Create multipart/mixed attachment, the first part of |
| 792 | which is the commit message and the patch itself in the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 793 | second part, with <tt>Content-Disposition: attachment</tt>. |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 794 | </p> |
| 795 | </dd> |
| 796 | <dt> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 797 | --no-attach |
| 798 | </dt> |
| 799 | <dd> |
| 800 | <p> |
| 801 | Disable the creation of an attachment, overriding the |
| 802 | configuration setting. |
| 803 | </p> |
| 804 | </dd> |
| 805 | <dt> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 806 | --inline[=<boundary>] |
| 807 | </dt> |
| 808 | <dd> |
| 809 | <p> |
| 810 | Create multipart/mixed attachment, the first part of |
| 811 | which is the commit message and the patch itself in the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 812 | second part, with <tt>Content-Disposition: inline</tt>. |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 813 | </p> |
| 814 | </dd> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 815 | <dt> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 816 | --thread[=<style>] |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 817 | </dt> |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 818 | <dt> |
| 819 | --no-thread |
| 820 | </dt> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 821 | <dd> |
| 822 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 823 | 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] | 824 | make the second and subsequent mails appear as replies to the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 825 | first. Also controls generation of the <tt>Message-Id</tt> header to |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 826 | reference. |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 827 | </p> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 828 | <div class="para"><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] | 829 | <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] | 830 | series, where the head is chosen from the cover letter, the |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 831 | <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] | 832 | threading makes every mail a reply to the previous one.</p></div> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 833 | <div class="para"><p>The default is <tt>--no-thread</tt>, unless the <em>format.thread</em> configuration |
| 834 | is set. If <tt>--thread</tt> is specified without a style, it defaults to the |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 835 | style specified by <em>format.thread</em> if any, or else <tt>shallow</tt>.</p></div> |
| 836 | <div class="para"><p>Beware that the default for <em>git send-email</em> is to thread emails |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 837 | itself. If you want <tt>git format-patch</tt> to take care of threading, you |
| 838 | 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] | 839 | </dd> |
| 840 | <dt> |
| 841 | --in-reply-to=Message-Id |
| 842 | </dt> |
| 843 | <dd> |
| 844 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 845 | 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] | 846 | reply to the given Message-Id, which avoids breaking threads to |
| 847 | provide a new patch series. |
| 848 | </p> |
| 849 | </dd> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 850 | <dt> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 851 | --ignore-if-in-upstream |
| 852 | </dt> |
| 853 | <dd> |
| 854 | <p> |
| 855 | Do not include a patch that matches a commit in |
| 856 | <until>..<since>. This will examine all patches reachable |
| 857 | from <since> but not from <until> and compare them with the |
| 858 | patches being generated, and any patch that matches is |
| 859 | ignored. |
| 860 | </p> |
| 861 | </dd> |
| 862 | <dt> |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 863 | --subject-prefix=<Subject-Prefix> |
| 864 | </dt> |
| 865 | <dd> |
| 866 | <p> |
| 867 | Instead of the standard <em>[PATCH]</em> prefix in the subject |
| 868 | line, instead use <em>[<Subject-Prefix>]</em>. This |
| 869 | allows for useful naming of a patch series, and can be |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 870 | combined with the <tt>--numbered</tt> option. |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 871 | </p> |
| 872 | </dd> |
| 873 | <dt> |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 874 | --to=<email> |
| 875 | </dt> |
| 876 | <dd> |
| 877 | <p> |
| 878 | Add a <tt>To:</tt> header to the email headers. This is in addition |
| 879 | to any configured headers, and may be used multiple times. |
| 880 | </p> |
| 881 | </dd> |
| 882 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 883 | --cc=<email> |
| 884 | </dt> |
| 885 | <dd> |
| 886 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 887 | 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] | 888 | to any configured headers, and may be used multiple times. |
| 889 | </p> |
| 890 | </dd> |
| 891 | <dt> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 892 | --add-header=<header> |
| 893 | </dt> |
| 894 | <dd> |
| 895 | <p> |
| 896 | Add an arbitrary header to the email headers. This is in addition |
| 897 | to any configured headers, and may be used multiple times. |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 898 | For example, <tt>--add-header="Organization: git-foo"</tt> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 899 | </p> |
| 900 | </dd> |
| 901 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 902 | --cover-letter |
| 903 | </dt> |
| 904 | <dd> |
| 905 | <p> |
Junio C Hamano | 92a4abd | 2008-08-15 05:34:44 | [diff] [blame] | 906 | In addition to the patches, generate a cover letter file |
| 907 | containing the shortlog and the overall diffstat. You can |
| 908 | fill in a description in the file before sending it out. |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 909 | </p> |
| 910 | </dd> |
| 911 | <dt> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 912 | --[no]-signature=<signature> |
| 913 | </dt> |
| 914 | <dd> |
| 915 | <p> |
| 916 | Add a signature to each message produced. Per RFC 3676 the signature |
| 917 | is separated from the body by a line with <em>-- </em> on it. If the |
| 918 | signature option is omitted the signature defaults to the git version |
| 919 | number. |
| 920 | </p> |
| 921 | </dd> |
| 922 | <dt> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 923 | --suffix=.<sfx> |
| 924 | </dt> |
| 925 | <dd> |
| 926 | <p> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 927 | Instead of using <tt>.patch</tt> as the suffix for generated |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 928 | filenames, use specified suffix. A common alternative is |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 929 | <tt>--suffix=.txt</tt>. Leaving this empty will remove the <tt>.patch</tt> |
| 930 | suffix. |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 931 | </p> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 932 | <div class="para"><p>Note that the leading character does not have to be a dot; for example, |
| 933 | 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] | 934 | </dd> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 935 | <dt> |
| 936 | --no-binary |
| 937 | </dt> |
| 938 | <dd> |
| 939 | <p> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 940 | Do not output contents of changes in binary files, instead |
| 941 | display a notice that those files changed. Patches generated |
| 942 | using this option cannot be applied properly, but they are |
| 943 | still useful for code review. |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 944 | </p> |
| 945 | </dd> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 946 | <dt> |
| 947 | --root |
| 948 | </dt> |
| 949 | <dd> |
| 950 | <p> |
| 951 | Treat the revision argument as a <revision range>, even if it |
| 952 | is just a single commit (that would normally be treated as a |
| 953 | <since>). Note that root commits included in the specified |
| 954 | range are always formatted as creation patches, independently |
| 955 | of this flag. |
| 956 | </p> |
| 957 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 958 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 959 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 960 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 961 | <div class="sectionbody"> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 962 | <div class="para"><p>You can specify extra mail header lines to be added to each message, |
| 963 | defaults for the subject prefix and file suffix, number patches when |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 964 | outputting more than one patch, add "To" or "Cc:" headers, configure |
| 965 | attachments, and sign off patches with configuration variables.</p></div> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 966 | <div class="listingblock"> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 967 | <div class="content"> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 968 | <pre><tt>[format] |
| 969 | headers = "Organization: git-foo\n" |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 970 | subjectprefix = CHANGE |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 971 | suffix = .txt |
Junio C Hamano | 2fbcd21 | 2008-05-14 22:26:07 | [diff] [blame] | 972 | numbered = auto |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 973 | to = <email> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 974 | cc = <email> |
Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 975 | attach [ = mime-boundary-string ] |
| 976 | signoff = true</tt></pre> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 977 | </div></div> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 978 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 979 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 980 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 981 | <div class="ilist"><ul> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 982 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 983 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 984 | 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] | 985 | the current branch using <em>git am</em> to cherry-pick them: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 986 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 987 | <div class="listingblock"> |
| 988 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 989 | <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] | 990 | </div></div> |
| 991 | </li> |
| 992 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 993 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 994 | Extract all commits which are in the current branch but not in the |
| 995 | origin branch: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 996 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 997 | <div class="listingblock"> |
| 998 | <div class="content"> |
| 999 | <pre><tt>$ git format-patch origin</tt></pre> |
| 1000 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1001 | <div class="para"><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] | 1002 | </li> |
| 1003 | <li> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1004 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1005 | Extract all commits that lead to <em>origin</em> since the inception of the |
| 1006 | project: |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1007 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1008 | <div class="listingblock"> |
| 1009 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1010 | <pre><tt>$ git format-patch --root origin</tt></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1011 | </div></div> |
| 1012 | </li> |
| 1013 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1014 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1015 | The same as the previous one: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1016 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1017 | <div class="listingblock"> |
| 1018 | <div class="content"> |
| 1019 | <pre><tt>$ git format-patch -M -B origin</tt></pre> |
| 1020 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1021 | <div class="para"><p>Additionally, it detects and handles renames and complete rewrites |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1022 | intelligently to produce a renaming patch. A renaming patch reduces |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1023 | the amount of text output, and generally makes it easier to review. |
| 1024 | Note that non-git "patch" programs won't understand renaming patches, so |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1025 | 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] | 1026 | </li> |
| 1027 | <li> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1028 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1029 | Extract three topmost commits from the current branch and format them |
| 1030 | as e-mailable patches: |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1031 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1032 | <div class="listingblock"> |
| 1033 | <div class="content"> |
| 1034 | <pre><tt>$ git format-patch -3</tt></pre> |
| 1035 | </div></div> |
| 1036 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1037 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1038 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1039 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1040 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1041 | <div class="para"><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] | 1042 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1043 | <h2 id="_author">Author</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1044 | <div class="sectionbody"> |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 1045 | <div class="para"><p>Written by Junio C Hamano <gitster@pobox.com></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1046 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1047 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1048 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1049 | <div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1050 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1051 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1052 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1053 | <div class="para"><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] | 1054 | </div> |
| 1055 | <div id="footer"> |
| 1056 | <div id="footer-text"> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame^] | 1057 | Last updated 2010-07-01 00:08:20 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1058 | </div> |
| 1059 | </div> |
| 1060 | </body> |
| 1061 | </html> |