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 |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 357 | REVISIONS" section in <a href="gitrevisions.html">gitrevisions(1)</a>) means the |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 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> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 522 | -B[<n>][/<m>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 523 | </dt> |
| 524 | <dd> |
| 525 | <p> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 526 | Break complete rewrite changes into pairs of delete and |
| 527 | create. This serves two purposes: |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 528 | </p> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 529 | <div class="para"><p>It affects the way a change that amounts to a total rewrite of a file |
| 530 | not as a series of deletion and insertion mixed together with a very |
| 531 | few lines that happen to match textually as the context, but as a |
| 532 | single deletion of everything old followed by a single insertion of |
| 533 | everything new, and the number <tt>m</tt> controls this aspect of the -B |
| 534 | option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the |
| 535 | original should remain in the result for git to consider it a total |
| 536 | rewrite (i.e. otherwise the resulting patch will be a series of |
| 537 | deletion and insertion mixed together with context lines).</p></div> |
| 538 | <div class="para"><p>When used with -M, a totally-rewritten file is also considered as the |
| 539 | source of a rename (usually -M only considers a file that disappeared |
| 540 | as the source of a rename), and the number <tt>n</tt> controls this aspect of |
| 541 | the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with |
| 542 | addition and deletion compared to 20% or more of the file's size are |
| 543 | eligible for being picked up as a possible source of a rename to |
| 544 | another file.</p></div> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 545 | </dd> |
| 546 | <dt> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 547 | -M[<n>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 548 | </dt> |
| 549 | <dd> |
| 550 | <p> |
| 551 | Detect renames. |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 552 | If <tt>n</tt> is specified, it is a is a threshold on the similarity |
| 553 | index (i.e. amount of addition/deletions compared to the |
| 554 | file's size). For example, <tt>-M90%</tt> means git should consider a |
| 555 | delete/add pair to be a rename if more than 90% of the file |
| 556 | hasn't changed. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 557 | </p> |
| 558 | </dd> |
| 559 | <dt> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 560 | -C[<n>] |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 561 | </dt> |
| 562 | <dd> |
| 563 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 564 | Detect copies as well as renames. See also <tt>--find-copies-harder</tt>. |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 565 | 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] | 566 | </p> |
| 567 | </dd> |
| 568 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 569 | --find-copies-harder |
| 570 | </dt> |
| 571 | <dd> |
| 572 | <p> |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 573 | For performance reasons, by default, <tt>-C</tt> option finds copies only |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 574 | if the original file of the copy was modified in the same |
| 575 | changeset. This flag makes the command |
| 576 | inspect unmodified files as candidates for the source of |
| 577 | copy. This is a very expensive operation for large |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 578 | projects, so use it with caution. Giving more than one |
| 579 | <tt>-C</tt> option has the same effect. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 580 | </p> |
| 581 | </dd> |
| 582 | <dt> |
| 583 | -l<num> |
| 584 | </dt> |
| 585 | <dd> |
| 586 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 587 | 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] | 588 | is the number of potential rename/copy targets. This |
| 589 | option prevents rename/copy detection from running if |
| 590 | the number of rename/copy targets exceeds the specified |
| 591 | number. |
| 592 | </p> |
| 593 | </dd> |
| 594 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 595 | -O<orderfile> |
| 596 | </dt> |
| 597 | <dd> |
| 598 | <p> |
| 599 | Output the patch in the order specified in the |
| 600 | <orderfile>, which has one shell glob pattern per line. |
| 601 | </p> |
| 602 | </dd> |
| 603 | <dt> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 604 | -a |
| 605 | </dt> |
| 606 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 607 | --text |
| 608 | </dt> |
| 609 | <dd> |
| 610 | <p> |
| 611 | Treat all files as text. |
| 612 | </p> |
| 613 | </dd> |
| 614 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 615 | --ignore-space-at-eol |
| 616 | </dt> |
| 617 | <dd> |
| 618 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 619 | Ignore changes in whitespace at EOL. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 620 | </p> |
| 621 | </dd> |
| 622 | <dt> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 623 | -b |
| 624 | </dt> |
| 625 | <dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 626 | --ignore-space-change |
| 627 | </dt> |
| 628 | <dd> |
| 629 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 630 | Ignore changes in amount of whitespace. This ignores whitespace |
| 631 | at line end, and considers all other sequences of one or |
| 632 | more whitespace characters to be equivalent. |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 633 | </p> |
| 634 | </dd> |
| 635 | <dt> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 636 | -w |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 637 | </dt> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 638 | <dt> |
| 639 | --ignore-all-space |
| 640 | </dt> |
| 641 | <dd> |
| 642 | <p> |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 643 | Ignore whitespace when comparing lines. This ignores |
| 644 | differences even if one line has whitespace where the other |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 645 | line has none. |
| 646 | </p> |
| 647 | </dd> |
| 648 | <dt> |
Junio C Hamano | 1d40ee8 | 2009-01-07 10:14:16 | [diff] [blame] | 649 | --inter-hunk-context=<lines> |
| 650 | </dt> |
| 651 | <dd> |
| 652 | <p> |
| 653 | Show the context between diff hunks, up to the specified number |
| 654 | of lines, thereby fusing hunks that are close to each other. |
| 655 | </p> |
| 656 | </dd> |
| 657 | <dt> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 658 | --ext-diff |
| 659 | </dt> |
| 660 | <dd> |
| 661 | <p> |
| 662 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 663 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 664 | 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] | 665 | </p> |
| 666 | </dd> |
| 667 | <dt> |
| 668 | --no-ext-diff |
| 669 | </dt> |
| 670 | <dd> |
| 671 | <p> |
| 672 | Disallow external diff drivers. |
| 673 | </p> |
| 674 | </dd> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 675 | <dt> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 676 | --ignore-submodules[=<when>] |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 677 | </dt> |
| 678 | <dd> |
| 679 | <p> |
Junio C Hamano | 7d44952 | 2010-07-01 00:08:51 | [diff] [blame] | 680 | Ignore changes to submodules in the diff generation. <when> can be |
| 681 | either "untracked", "dirty" or "all", which is the default. When |
| 682 | "untracked" is used submodules are not considered dirty when they only |
| 683 | contain untracked content (but they are still scanned for modified |
| 684 | content). Using "dirty" ignores all changes to the work tree of submodules, |
| 685 | only changes to the commits stored in the superproject are shown (this was |
| 686 | 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] | 687 | </p> |
| 688 | </dd> |
| 689 | <dt> |
Junio C Hamano | e27cbd2 | 2007-12-21 17:57:33 | [diff] [blame] | 690 | --src-prefix=<prefix> |
| 691 | </dt> |
| 692 | <dd> |
| 693 | <p> |
| 694 | Show the given source prefix instead of "a/". |
| 695 | </p> |
| 696 | </dd> |
| 697 | <dt> |
| 698 | --dst-prefix=<prefix> |
| 699 | </dt> |
| 700 | <dd> |
| 701 | <p> |
| 702 | Show the given destination prefix instead of "b/". |
| 703 | </p> |
| 704 | </dd> |
| 705 | <dt> |
| 706 | --no-prefix |
| 707 | </dt> |
| 708 | <dd> |
| 709 | <p> |
| 710 | Do not show any source or destination prefix. |
| 711 | </p> |
| 712 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 713 | </dl></div> |
| 714 | <div class="para"><p>For more detailed explanation on these common options, see also |
| 715 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
| 716 | <div class="vlist"><dl> |
Junio C Hamano | 60f8aa8 | 2007-03-06 09:58:26 | [diff] [blame] | 717 | <dt> |
Junio C Hamano | bb0f404 | 2007-07-04 06:41:40 | [diff] [blame] | 718 | -<n> |
| 719 | </dt> |
| 720 | <dd> |
| 721 | <p> |
| 722 | Limits the number of patches to prepare. |
| 723 | </p> |
| 724 | </dd> |
| 725 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 726 | -o <dir> |
| 727 | </dt> |
| 728 | <dt> |
| 729 | --output-directory <dir> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 730 | </dt> |
| 731 | <dd> |
| 732 | <p> |
| 733 | Use <dir> to store the resulting files, instead of the |
Junio C Hamano | 1bab4b0 | 2006-06-06 21:58:33 | [diff] [blame] | 734 | current working directory. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 735 | </p> |
| 736 | </dd> |
| 737 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 738 | -n |
| 739 | </dt> |
| 740 | <dt> |
| 741 | --numbered |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 742 | </dt> |
| 743 | <dd> |
| 744 | <p> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 745 | 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] | 746 | </p> |
| 747 | </dd> |
| 748 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 749 | -N |
| 750 | </dt> |
| 751 | <dt> |
| 752 | --no-numbered |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 753 | </dt> |
| 754 | <dd> |
| 755 | <p> |
| 756 | Name output in <em>[PATCH]</em> format. |
| 757 | </p> |
| 758 | </dd> |
| 759 | <dt> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 760 | --start-number <n> |
| 761 | </dt> |
| 762 | <dd> |
| 763 | <p> |
| 764 | Start numbering the patches at <n> instead of 1. |
| 765 | </p> |
| 766 | </dd> |
| 767 | <dt> |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 768 | --numbered-files |
| 769 | </dt> |
| 770 | <dd> |
| 771 | <p> |
| 772 | Output file names will be a simple number sequence |
| 773 | without the default first line of the commit appended. |
Junio C Hamano | 94cad1a | 2007-06-06 10:48:25 | [diff] [blame] | 774 | </p> |
| 775 | </dd> |
| 776 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 777 | -k |
| 778 | </dt> |
| 779 | <dt> |
| 780 | --keep-subject |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 781 | </dt> |
| 782 | <dd> |
| 783 | <p> |
| 784 | Do not strip/add <em>[PATCH]</em> from the first line of the |
| 785 | commit log message. |
| 786 | </p> |
| 787 | </dd> |
| 788 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 789 | -s |
| 790 | </dt> |
| 791 | <dt> |
| 792 | --signoff |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 793 | </dt> |
| 794 | <dd> |
| 795 | <p> |
| 796 | Add <tt>Signed-off-by:</tt> line to the commit message, using |
| 797 | the committer identity of yourself. |
| 798 | </p> |
| 799 | </dd> |
| 800 | <dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 801 | --stdout |
| 802 | </dt> |
| 803 | <dd> |
| 804 | <p> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 805 | Print all commits to the standard output in mbox format, |
| 806 | instead of creating a file for each one. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 807 | </p> |
| 808 | </dd> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 809 | <dt> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 810 | --attach[=<boundary>] |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 811 | </dt> |
| 812 | <dd> |
| 813 | <p> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 814 | Create multipart/mixed attachment, the first part of |
| 815 | which is the commit message and the patch itself in the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 816 | second part, with <tt>Content-Disposition: attachment</tt>. |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 817 | </p> |
| 818 | </dd> |
| 819 | <dt> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 820 | --no-attach |
| 821 | </dt> |
| 822 | <dd> |
| 823 | <p> |
| 824 | Disable the creation of an attachment, overriding the |
| 825 | configuration setting. |
| 826 | </p> |
| 827 | </dd> |
| 828 | <dt> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 829 | --inline[=<boundary>] |
| 830 | </dt> |
| 831 | <dd> |
| 832 | <p> |
| 833 | Create multipart/mixed attachment, the first part of |
| 834 | which is the commit message and the patch itself in the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 835 | second part, with <tt>Content-Disposition: inline</tt>. |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 836 | </p> |
| 837 | </dd> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 838 | <dt> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 839 | --thread[=<style>] |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 840 | </dt> |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 841 | <dt> |
| 842 | --no-thread |
| 843 | </dt> |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 844 | <dd> |
| 845 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 846 | 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] | 847 | make the second and subsequent mails appear as replies to the |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 848 | first. Also controls generation of the <tt>Message-Id</tt> header to |
Junio C Hamano | 1bbd0f4 | 2009-07-23 06:20:29 | [diff] [blame] | 849 | reference. |
Junio C Hamano | f9ca97d | 2006-07-25 22:23:09 | [diff] [blame] | 850 | </p> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 851 | <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] | 852 | <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] | 853 | series, where the head is chosen from the cover letter, the |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 854 | <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] | 855 | threading makes every mail a reply to the previous one.</p></div> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 856 | <div class="para"><p>The default is <tt>--no-thread</tt>, unless the <em>format.thread</em> configuration |
| 857 | 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] | 858 | style specified by <em>format.thread</em> if any, or else <tt>shallow</tt>.</p></div> |
| 859 | <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] | 860 | itself. If you want <tt>git format-patch</tt> to take care of threading, you |
| 861 | 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] | 862 | </dd> |
| 863 | <dt> |
| 864 | --in-reply-to=Message-Id |
| 865 | </dt> |
| 866 | <dd> |
| 867 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 868 | 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] | 869 | reply to the given Message-Id, which avoids breaking threads to |
| 870 | provide a new patch series. |
| 871 | </p> |
| 872 | </dd> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 873 | <dt> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 874 | --ignore-if-in-upstream |
| 875 | </dt> |
| 876 | <dd> |
| 877 | <p> |
| 878 | Do not include a patch that matches a commit in |
| 879 | <until>..<since>. This will examine all patches reachable |
| 880 | from <since> but not from <until> and compare them with the |
| 881 | patches being generated, and any patch that matches is |
| 882 | ignored. |
| 883 | </p> |
| 884 | </dd> |
| 885 | <dt> |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 886 | --subject-prefix=<Subject-Prefix> |
| 887 | </dt> |
| 888 | <dd> |
| 889 | <p> |
| 890 | Instead of the standard <em>[PATCH]</em> prefix in the subject |
| 891 | line, instead use <em>[<Subject-Prefix>]</em>. This |
| 892 | allows for useful naming of a patch series, and can be |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 893 | combined with the <tt>--numbered</tt> option. |
Junio C Hamano | 6f1cca8 | 2007-04-12 05:02:47 | [diff] [blame] | 894 | </p> |
| 895 | </dd> |
| 896 | <dt> |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 897 | --to=<email> |
| 898 | </dt> |
| 899 | <dd> |
| 900 | <p> |
| 901 | Add a <tt>To:</tt> header to the email headers. This is in addition |
| 902 | to any configured headers, and may be used multiple times. |
| 903 | </p> |
| 904 | </dd> |
| 905 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 906 | --cc=<email> |
| 907 | </dt> |
| 908 | <dd> |
| 909 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 910 | 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] | 911 | to any configured headers, and may be used multiple times. |
| 912 | </p> |
| 913 | </dd> |
| 914 | <dt> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 915 | --add-header=<header> |
| 916 | </dt> |
| 917 | <dd> |
| 918 | <p> |
| 919 | Add an arbitrary header to the email headers. This is in addition |
| 920 | to any configured headers, and may be used multiple times. |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 921 | For example, <tt>--add-header="Organization: git-foo"</tt> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 922 | </p> |
| 923 | </dd> |
| 924 | <dt> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 925 | --cover-letter |
| 926 | </dt> |
| 927 | <dd> |
| 928 | <p> |
Junio C Hamano | 92a4abd | 2008-08-15 05:34:44 | [diff] [blame] | 929 | In addition to the patches, generate a cover letter file |
| 930 | containing the shortlog and the overall diffstat. You can |
| 931 | fill in a description in the file before sending it out. |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 932 | </p> |
| 933 | </dd> |
| 934 | <dt> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 935 | --[no]-signature=<signature> |
| 936 | </dt> |
| 937 | <dd> |
| 938 | <p> |
| 939 | Add a signature to each message produced. Per RFC 3676 the signature |
| 940 | is separated from the body by a line with <em>-- </em> on it. If the |
| 941 | signature option is omitted the signature defaults to the git version |
| 942 | number. |
| 943 | </p> |
| 944 | </dd> |
| 945 | <dt> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 946 | --suffix=.<sfx> |
| 947 | </dt> |
| 948 | <dd> |
| 949 | <p> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 950 | Instead of using <tt>.patch</tt> as the suffix for generated |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 951 | filenames, use specified suffix. A common alternative is |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 952 | <tt>--suffix=.txt</tt>. Leaving this empty will remove the <tt>.patch</tt> |
| 953 | suffix. |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 954 | </p> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 955 | <div class="para"><p>Note that the leading character does not have to be a dot; for example, |
| 956 | 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] | 957 | </dd> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 958 | <dt> |
| 959 | --no-binary |
| 960 | </dt> |
| 961 | <dd> |
| 962 | <p> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 963 | Do not output contents of changes in binary files, instead |
| 964 | display a notice that those files changed. Patches generated |
| 965 | using this option cannot be applied properly, but they are |
| 966 | still useful for code review. |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 967 | </p> |
| 968 | </dd> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 969 | <dt> |
| 970 | --root |
| 971 | </dt> |
| 972 | <dd> |
| 973 | <p> |
| 974 | Treat the revision argument as a <revision range>, even if it |
| 975 | is just a single commit (that would normally be treated as a |
| 976 | <since>). Note that root commits included in the specified |
| 977 | range are always formatted as creation patches, independently |
| 978 | of this flag. |
| 979 | </p> |
| 980 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 981 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 982 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 983 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 984 | <div class="sectionbody"> |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 985 | <div class="para"><p>You can specify extra mail header lines to be added to each message, |
| 986 | defaults for the subject prefix and file suffix, number patches when |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 987 | outputting more than one patch, add "To" or "Cc:" headers, configure |
| 988 | attachments, and sign off patches with configuration variables.</p></div> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 989 | <div class="listingblock"> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 990 | <div class="content"> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 991 | <pre><tt>[format] |
| 992 | headers = "Organization: git-foo\n" |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 993 | subjectprefix = CHANGE |
Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 994 | suffix = .txt |
Junio C Hamano | 2fbcd21 | 2008-05-14 22:26:07 | [diff] [blame] | 995 | numbered = auto |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 996 | to = <email> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 997 | cc = <email> |
Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 998 | attach [ = mime-boundary-string ] |
| 999 | signoff = true</tt></pre> |
Junio C Hamano | 4f9a605 | 2007-01-17 20:25:16 | [diff] [blame] | 1000 | </div></div> |
Junio C Hamano | 2496ae4 | 2006-03-11 08:04:33 | [diff] [blame] | 1001 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1002 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1003 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1004 | <div class="ilist"><ul> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1005 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1006 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1007 | 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] | 1008 | the current branch using <em>git am</em> to cherry-pick them: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1009 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1010 | <div class="listingblock"> |
| 1011 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1012 | <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] | 1013 | </div></div> |
| 1014 | </li> |
| 1015 | <li> |
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 | Extract all commits which are in the current branch but not in the |
| 1018 | origin branch: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1019 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1020 | <div class="listingblock"> |
| 1021 | <div class="content"> |
| 1022 | <pre><tt>$ git format-patch origin</tt></pre> |
| 1023 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1024 | <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] | 1025 | </li> |
| 1026 | <li> |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1027 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1028 | Extract all commits that lead to <em>origin</em> since the inception of the |
| 1029 | project: |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame] | 1030 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1031 | <div class="listingblock"> |
| 1032 | <div class="content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1033 | <pre><tt>$ git format-patch --root origin</tt></pre> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1034 | </div></div> |
| 1035 | </li> |
| 1036 | <li> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1037 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1038 | The same as the previous one: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1039 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1040 | <div class="listingblock"> |
| 1041 | <div class="content"> |
| 1042 | <pre><tt>$ git format-patch -M -B origin</tt></pre> |
| 1043 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1044 | <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] | 1045 | intelligently to produce a renaming patch. A renaming patch reduces |
Junio C Hamano | f458110 | 2009-04-25 08:29:59 | [diff] [blame] | 1046 | the amount of text output, and generally makes it easier to review. |
| 1047 | Note that non-git "patch" programs won't understand renaming patches, so |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1048 | 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] | 1049 | </li> |
| 1050 | <li> |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1051 | <p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1052 | Extract three topmost commits from the current branch and format them |
| 1053 | as e-mailable patches: |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 1054 | </p> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1055 | <div class="listingblock"> |
| 1056 | <div class="content"> |
| 1057 | <pre><tt>$ git format-patch -3</tt></pre> |
| 1058 | </div></div> |
| 1059 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1060 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1061 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1062 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1063 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1064 | <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] | 1065 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1066 | <h2 id="_author">Author</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1067 | <div class="sectionbody"> |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 1068 | <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] | 1069 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1070 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1071 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1072 | <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] | 1073 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1074 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1075 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1076 | <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] | 1077 | </div> |
| 1078 | <div id="footer"> |
| 1079 | <div id="footer-text"> |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame^] | 1080 | Last updated 2010-08-10 05:29:40 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1081 | </div> |
| 1082 | </div> |
| 1083 | </body> |
| 1084 | </html> |