blob: 92389af38db0ddc7a5433a329b8ebaa86092c276 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
Junio C Hamano9629d4f2012-12-19 00:28:275<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-format-patch(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9629d4f2012-12-19 00:28:279/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2324}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano1a4e8412005-12-27 08:17:2337
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2341}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2346}
47
Junio C Hamano1a4e8412005-12-27 08:17:2348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2350 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2359 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9629d4f2012-12-19 00:28:2767h5 {
68 font-size: 1.0em;
69}
Junio C Hamano1a4e8412005-12-27 08:17:2370
71div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2372 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9629d4f2012-12-19 00:28:2787ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9629d4f2012-12-19 00:28:2790.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9629d4f2012-12-19 00:28:2798
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9629d4f2012-12-19 00:28:27104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9629d4f2012-12-19 00:28:27106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9629d4f2012-12-19 00:28:27109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9629d4f2012-12-19 00:28:27115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9629d4f2012-12-19 00:28:27119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9629d4f2012-12-19 00:28:27124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9629d4f2012-12-19 00:28:27128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9629d4f2012-12-19 00:28:27169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9629d4f2012-12-19 00:28:27175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9629d4f2012-12-19 00:28:27185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9629d4f2012-12-19 00:28:27194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9629d4f2012-12-19 00:28:27331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9629d4f2012-12-19 00:28:27340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9629d4f2012-12-19 00:28:27348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9629d4f2012-12-19 00:28:27356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9629d4f2012-12-19 00:28:27372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9629d4f2012-12-19 00:28:27524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9629d4f2012-12-19 00:28:27527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9629d4f2012-12-19 00:28:27532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9629d4f2012-12-19 00:28:27580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9629d4f2012-12-19 00:28:27600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9629d4f2012-12-19 00:28:27646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9629d4f2012-12-19 00:28:27649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9629d4f2012-12-19 00:28:27670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9629d4f2012-12-19 00:28:27703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9629d4f2012-12-19 00:28:27728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9629d4f2012-12-19 00:28:27732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-format-patch(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-format-patch -
Junio C Hamano01078922006-03-10 00:31:47740 Prepare patches for e-mail submission
Junio C Hamano1a4e8412005-12-27 08:17:23741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9629d4f2012-12-19 00:28:27745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamano235a91e2006-01-07 01:13:58748<div class="verseblock">
Junio C Hamano9629d4f2012-12-19 00:28:27749<pre class="content"><em>git format-patch</em> [-k] [(-o|--output-directory) &lt;dir&gt; | --stdout]
Junio C Hamano1bbd0f42009-07-23 06:20:29750 [--no-thread | --thread[=&lt;style&gt;]]
Junio C Hamanof4581102009-04-25 08:29:59751 [(--attach|--inline)[=&lt;boundary&gt;] | --no-attach]
752 [-s | --signoff]
Junio C Hamano89a57342010-06-22 23:22:55753 [--signature=&lt;signature&gt; | --no-signature]
Junio C Hamano8c5802d2007-11-15 00:13:36754 [-n | --numbered | -N | --no-numbered]
Junio C Hamano94cad1a2007-06-06 10:48:25755 [--start-number &lt;n&gt;] [--numbered-files]
Junio C Hamano4f9a6052007-01-17 20:25:16756 [--in-reply-to=Message-Id] [--suffix=.&lt;sfx&gt;]
Junio C Hamano7c73c662007-01-19 00:37:50757 [--ignore-if-in-upstream]
Junio C Hamano7dac6902013-01-12 08:25:31758 [--subject-prefix=Subject-Prefix] [(--reroll-count|-v) &lt;n&gt;]
Junio C Hamanoea90ab32010-03-15 20:32:55759 [--to=&lt;email&gt;] [--cc=&lt;email&gt;]
Junio C Hamano4eb2b9c2012-11-15 21:12:29760 [--cover-letter] [--quiet] [--notes[=&lt;ref&gt;]]
Junio C Hamanof4581102009-04-25 08:29:59761 [&lt;common diff options&gt;]
Junio C Hamano9629d4f2012-12-19 00:28:27762 [ &lt;since&gt; | &lt;revision range&gt; ]</pre>
763<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59764</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23765</div>
Junio C Hamano9629d4f2012-12-19 00:28:27766</div>
767<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31768<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23769<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59770<div class="paragraph"><p>Prepare each commit with its patch in
Junio C Hamano341071d2006-06-04 07:24:48771one file per commit, formatted to resemble UNIX mailbox format.
Junio C Hamano7d9e9bd2007-08-29 07:31:47772The output of this command is convenient for e-mail submission or
Junio C Hamano1aa40d22010-01-21 17:46:43773for use with <em>git am</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59774<div class="paragraph"><p>There are two ways to specify which commits to operate on.</p></div>
775<div class="olist arabic"><ol class="arabic">
Junio C Hamano7d9e9bd2007-08-29 07:31:47776<li>
777<p>
778A single commit, &lt;since&gt;, specifies that the commits leading
779 to the tip of the current branch that are not in the history
780 that leads to the &lt;since&gt; to be output.
781</p>
782</li>
783<li>
784<p>
785Generic &lt;revision range&gt; expression (see "SPECIFYING
Junio C Hamanoa28a9202012-06-21 07:08:23786 REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>) means the
Junio C Hamano7d9e9bd2007-08-29 07:31:47787 commits in the specified range.
788</p>
789</li>
Junio C Hamanoba4b9282008-07-06 05:20:31790</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:59791<div class="paragraph"><p>The first rule takes precedence in the case of a single &lt;commit&gt;. To
Junio C Hamano9572e922009-04-02 06:52:03792apply the second rule, i.e., format everything since the beginning of
Junio C Hamano9629d4f2012-12-19 00:28:27793history up until &lt;commit&gt;, use the <em>--root</em> option: <code>git format-patch
794--root &lt;commit&gt;</code>. If you want to format only &lt;commit&gt; itself, you
795can do this with <code>git format-patch -1 &lt;commit&gt;</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59796<div class="paragraph"><p>By default, each output file is numbered sequentially from 1, and uses the
Junio C Hamano341071d2006-06-04 07:24:48797first line of the commit message (massaged for pathname safety) as
Junio C Hamano9629d4f2012-12-19 00:28:27798the filename. With the <code>--numbered-files</code> option, the output file names
Junio C Hamano94cad1a2007-06-06 10:48:25799will only be numbers, without the first line of the commit appended.
800The names of the output files are printed to standard
Junio C Hamano9629d4f2012-12-19 00:28:27801output, unless the <code>--stdout</code> option is specified.</p></div>
802<div class="paragraph"><p>If <code>-o</code> is specified, output files are created in &lt;dir&gt;. Otherwise
Junio C Hamanoba4b9282008-07-06 05:20:31803they are created in the current working directory.</p></div>
Junio C Hamano281fd392012-09-17 23:57:41804<div class="paragraph"><p>By default, the subject of a single patch is "[PATCH] " followed by
805the concatenation of lines from the commit message up to the first blank
806line (see the DISCUSSION section of <a href="git-commit.html">git-commit(1)</a>).</p></div>
807<div class="paragraph"><p>When multiple patches are output, the subject prefix will instead be
Junio C Hamano9629d4f2012-12-19 00:28:27808"[PATCH n/m] ". To force 1/1 to be added for a single patch, use <code>-n</code>.
809To omit patch numbers from the subject, use <code>-N</code>.</p></div>
810<div class="paragraph"><p>If given <code>--thread</code>, <code>git-format-patch</code> will generate <code>In-Reply-To</code> and
811<code>References</code> headers to make the second and subsequent patch mails appear
812as replies to the first mail; this also generates a <code>Message-Id</code> header to
Junio C Hamanoba4b9282008-07-06 05:20:31813reference.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23814</div>
Junio C Hamano9629d4f2012-12-19 00:28:27815</div>
816<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31817<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23818<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59819<div class="dlist"><dl>
820<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:26821-p
822</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59823<dt class="hdlist1">
Junio C Hamano3b70d3c2009-11-21 17:37:37824--no-stat
825</dt>
Junio C Hamano60f8aa82007-03-06 09:58:26826<dd>
827<p>
Junio C Hamano3b70d3c2009-11-21 17:37:37828 Generate plain patches without any diffstats.
Junio C Hamano60f8aa82007-03-06 09:58:26829</p>
830</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59831<dt class="hdlist1">
Junio C Hamano69361562007-07-26 02:14:34832-U&lt;n&gt;
833</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59834<dt class="hdlist1">
Junio C Hamano69361562007-07-26 02:14:34835--unified=&lt;n&gt;
836</dt>
837<dd>
838<p>
839 Generate diffs with &lt;n&gt; lines of context instead of
Junio C Hamano3b70d3c2009-11-21 17:37:37840 the usual three.
Junio C Hamano60f8aa82007-03-06 09:58:26841</p>
842</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59843<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:34844--minimal
845</dt>
846<dd>
847<p>
848 Spend extra time to make sure the smallest possible
849 diff is produced.
850</p>
851</dd>
852<dt class="hdlist1">
Junio C Hamano20d47e32009-01-26 06:36:02853--patience
854</dt>
855<dd>
856<p>
857 Generate a diff using the "patience diff" algorithm.
858</p>
859</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59860<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:11861--histogram
862</dt>
863<dd>
864<p>
865 Generate a diff using the "histogram diff" algorithm.
866</p>
867</dd>
868<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:03869--diff-algorithm={patience|minimal|histogram|myers}
870</dt>
871<dd>
872<p>
873 Choose a diff algorithm. The variants are as follows:
874</p>
875<div class="openblock">
876<div class="content">
877<div class="dlist"><dl>
878<dt class="hdlist1">
879<code>default</code>, <code>myers</code>
880</dt>
881<dd>
882<p>
883 The basic greedy diff algorithm. Currently, this is the default.
884</p>
885</dd>
886<dt class="hdlist1">
887<code>minimal</code>
888</dt>
889<dd>
890<p>
891 Spend extra time to make sure the smallest possible diff is
892 produced.
893</p>
894</dd>
895<dt class="hdlist1">
896<code>patience</code>
897</dt>
898<dd>
899<p>
900 Use "patience diff" algorithm when generating patches.
901</p>
902</dd>
903<dt class="hdlist1">
904<code>histogram</code>
905</dt>
906<dd>
907<p>
908 This algorithm extends the patience algorithm to "support
909 low-occurrence common elements".
910</p>
911</dd>
912</dl></div>
913</div></div>
914<div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a
915non-default value and want to use the default one, then you
916have to use <code>--diff-algorithm=default</code> option.</p></div>
917</dd>
918<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:32919--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamano60f8aa82007-03-06 09:58:26920</dt>
921<dd>
922<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:11923 Generate a diffstat. By default, as much space as necessary
924 will be used for the filename part, and the rest for the graph
925 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:39926 if not connected to a terminal, and can be overridden by
Junio C Hamano9629d4f2012-12-19 00:28:27927 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
928 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:11929 of the graph part can be limited by using
Junio C Hamano9629d4f2012-12-19 00:28:27930 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
931 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
932 (does not affect <code>git format-patch</code>).
933 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
934 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:11935 there are more.
Junio C Hamano60f8aa82007-03-06 09:58:26936</p>
Junio C Hamano9629d4f2012-12-19 00:28:27937<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
938<code>--stat-name-width=&lt;name-width&gt;</code> and <code>--stat-count=&lt;count&gt;</code>.</p></div>
Junio C Hamano60f8aa82007-03-06 09:58:26939</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59940<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:26941--numstat
942</dt>
943<dd>
944<p>
Junio C Hamano9629d4f2012-12-19 00:28:27945 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamano60f8aa82007-03-06 09:58:26946 deleted lines in decimal notation and pathname without
947 abbreviation, to make it more machine friendly. For
Junio C Hamano9629d4f2012-12-19 00:28:27948 binary files, outputs two <code>-</code> instead of saying
949 <code>0 0</code>.
Junio C Hamano60f8aa82007-03-06 09:58:26950</p>
951</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59952<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:26953--shortstat
954</dt>
955<dd>
956<p>
Junio C Hamano9629d4f2012-12-19 00:28:27957 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamano60f8aa82007-03-06 09:58:26958 number of modified files, as well as number of added and deleted
959 lines.
960</p>
961</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59962<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:32963--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamano6a45be92008-04-22 08:19:03964</dt>
965<dd>
966<p>
Junio C Hamano1c222c52011-05-13 19:55:32967 Output the distribution of relative amount of changes for each
Junio C Hamano9629d4f2012-12-19 00:28:27968 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:32969 passing it a comma separated list of parameters.
Junio C Hamano9629d4f2012-12-19 00:28:27970 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:23971 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:32972 The following parameters are available:
Junio C Hamano6a45be92008-04-22 08:19:03973</p>
Junio C Hamano9629d4f2012-12-19 00:28:27974<div class="openblock">
975<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:32976<div class="dlist"><dl>
977<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:27978<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:32979</dt>
980<dd>
981<p>
982 Compute the dirstat numbers by counting the lines that have been
983 removed from the source, or added to the destination. This ignores
984 the amount of pure code movements within a file. In other words,
985 rearranging lines in a file is not counted as much as other changes.
986 This is the default behavior when no parameter is given.
987</p>
Junio C Hamano6a45be92008-04-22 08:19:03988</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59989<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:27990<code>lines</code>
Junio C Hamanoa476efa2008-10-10 15:31:42991</dt>
992<dd>
993<p>
Junio C Hamano1c222c52011-05-13 19:55:32994 Compute the dirstat numbers by doing the regular line-based diff
995 analysis, and summing the removed/added line counts. (For binary
996 files, count 64-byte chunks instead, since binary files have no
Junio C Hamano9629d4f2012-12-19 00:28:27997 natural concept of lines). This is a more expensive <code>--dirstat</code>
998 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:32999 lines within a file as much as other changes. The resulting output
Junio C Hamano9629d4f2012-12-19 00:28:271000 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanoa476efa2008-10-10 15:31:421001</p>
1002</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591003<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:271004<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:321005</dt>
1006<dd>
1007<p>
1008 Compute the dirstat numbers by counting the number of files changed.
1009 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamano9629d4f2012-12-19 00:28:271010 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:321011 not have to look at the file contents at all.
1012</p>
1013</dd>
1014<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:271015<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:321016</dt>
1017<dd>
1018<p>
1019 Count changes in a child directory for the parent directory as well.
Junio C Hamano9629d4f2012-12-19 00:28:271020 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:321021 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamano9629d4f2012-12-19 00:28:271022 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:321023</p>
1024</dd>
1025<dt class="hdlist1">
1026&lt;limit&gt;
1027</dt>
1028<dd>
1029<p>
1030 An integer parameter specifies a cut-off percent (3% by default).
1031 Directories contributing less than this percentage of the changes
1032 are not shown in the output.
1033</p>
1034</dd>
1035</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271036</div></div>
Junio C Hamano1c222c52011-05-13 19:55:321037<div class="paragraph"><p>Example: The following will count changed files, while ignoring
1038directories with less than 10% of the total amount of changed files,
1039and accumulating child directory counts in the parent directories:
Junio C Hamano9629d4f2012-12-19 00:28:271040<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:321041</dd>
1042<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261043--summary
1044</dt>
1045<dd>
1046<p>
1047 Output a condensed summary of extended header information
1048 such as creations, renames and mode changes.
1049</p>
1050</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591051<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261052--no-renames
1053</dt>
1054<dd>
1055<p>
1056 Turn off rename detection, even when the configuration
1057 file gives the default to do so.
1058</p>
1059</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591060<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261061--full-index
1062</dt>
1063<dd>
1064<p>
Junio C Hamano5cf43ca2008-08-20 09:14:141065 Instead of the first handful of characters, show the full
1066 pre- and post-image blob object names on the "index"
1067 line when generating patch format output.
Junio C Hamano60f8aa82007-03-06 09:58:261068</p>
1069</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591070<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261071--binary
1072</dt>
1073<dd>
1074<p>
Junio C Hamano9629d4f2012-12-19 00:28:271075 In addition to <code>--full-index</code>, output a binary diff that
1076 can be applied with <code>git-apply</code>.
Junio C Hamano60f8aa82007-03-06 09:58:261077</p>
1078</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591079<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261080--abbrev[=&lt;n&gt;]
1081</dt>
1082<dd>
1083<p>
1084 Instead of showing the full 40-byte hexadecimal object
1085 name in diff-raw format output and diff-tree header
Junio C Hamano6efe3022009-01-13 16:47:561086 lines, show only a partial prefix. This is
Junio C Hamano9629d4f2012-12-19 00:28:271087 independent of the <code>--full-index</code> option above, which controls
Junio C Hamano60f8aa82007-03-06 09:58:261088 the diff-patch output format. Non default number of
Junio C Hamano9629d4f2012-12-19 00:28:271089 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamano60f8aa82007-03-06 09:58:261090</p>
1091</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591092<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141093-B[&lt;n&gt;][/&lt;m&gt;]
Junio C Hamano60f8aa82007-03-06 09:58:261094</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591095<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541096--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
1097</dt>
Junio C Hamano60f8aa82007-03-06 09:58:261098<dd>
1099<p>
Junio C Hamanoe85e36f2010-08-10 05:30:141100 Break complete rewrite changes into pairs of delete and
1101 create. This serves two purposes:
Junio C Hamano60f8aa82007-03-06 09:58:261102</p>
Junio C Hamano68cf15a2010-11-06 01:01:591103<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
Junio C Hamanoe85e36f2010-08-10 05:30:141104not as a series of deletion and insertion mixed together with a very
1105few lines that happen to match textually as the context, but as a
1106single deletion of everything old followed by a single insertion of
Junio C Hamano9629d4f2012-12-19 00:28:271107everything new, and the number <code>m</code> controls this aspect of the -B
1108option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:211109original should remain in the result for Git to consider it a total
Junio C Hamanoe85e36f2010-08-10 05:30:141110rewrite (i.e. otherwise the resulting patch will be a series of
1111deletion and insertion mixed together with context lines).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591112<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
Junio C Hamanoe85e36f2010-08-10 05:30:141113source of a rename (usually -M only considers a file that disappeared
Junio C Hamano9629d4f2012-12-19 00:28:271114as the source of a rename), and the number <code>n</code> controls this aspect of
1115the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamano68cf15a2010-11-06 01:01:591116addition and deletion compared to 20% or more of the file&#8217;s size are
Junio C Hamanoe85e36f2010-08-10 05:30:141117eligible for being picked up as a possible source of a rename to
1118another file.</p></div>
Junio C Hamano60f8aa82007-03-06 09:58:261119</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591120<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141121-M[&lt;n&gt;]
Junio C Hamano60f8aa82007-03-06 09:58:261122</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591123<dt class="hdlist1">
Junio C Hamano0d75e872010-12-17 06:57:261124--find-renames[=&lt;n&gt;]
Junio C Hamano39c7a692010-10-27 06:08:541125</dt>
Junio C Hamano60f8aa82007-03-06 09:58:261126<dd>
1127<p>
1128 Detect renames.
Junio C Hamano9629d4f2012-12-19 00:28:271129 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanoe85e36f2010-08-10 05:30:141130 index (i.e. amount of addition/deletions compared to the
Junio C Hamano076ffcc2013-02-06 05:13:211131 file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
Junio C Hamanoe85e36f2010-08-10 05:30:141132 delete/add pair to be a rename if more than 90% of the file
Junio C Hamano9629d4f2012-12-19 00:28:271133 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
1134 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
1135 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
1136 the same as <code>-M5%</code>. To limit detection to exact renames, use
1137 <code>-M100%</code>.
Junio C Hamano60f8aa82007-03-06 09:58:261138</p>
1139</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591140<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141141-C[&lt;n&gt;]
Junio C Hamano60f8aa82007-03-06 09:58:261142</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591143<dt class="hdlist1">
Junio C Hamano0d75e872010-12-17 06:57:261144--find-copies[=&lt;n&gt;]
Junio C Hamano39c7a692010-10-27 06:08:541145</dt>
Junio C Hamano60f8aa82007-03-06 09:58:261146<dd>
1147<p>
Junio C Hamano9629d4f2012-12-19 00:28:271148 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
1149 If <code>n</code> is specified, it has the same meaning as for <code>-M&lt;n&gt;</code>.
Junio C Hamano60f8aa82007-03-06 09:58:261150</p>
1151</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591152<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261153--find-copies-harder
1154</dt>
1155<dd>
1156<p>
Junio C Hamano9629d4f2012-12-19 00:28:271157 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamano60f8aa82007-03-06 09:58:261158 if the original file of the copy was modified in the same
1159 changeset. This flag makes the command
1160 inspect unmodified files as candidates for the source of
1161 copy. This is a very expensive operation for large
Junio C Hamano16f98872007-06-12 16:09:141162 projects, so use it with caution. Giving more than one
Junio C Hamano9629d4f2012-12-19 00:28:271163 <code>-C</code> option has the same effect.
Junio C Hamano60f8aa82007-03-06 09:58:261164</p>
1165</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591166<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:021167-D
1168</dt>
1169<dt class="hdlist1">
1170--irreversible-delete
1171</dt>
1172<dd>
1173<p>
1174 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamano9629d4f2012-12-19 00:28:271175 the diff between the preimage and <code>/dev/null</code>. The resulting patch
1176 is not meant to be applied with <code>patch</code> nor <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:021177 solely for people who want to just concentrate on reviewing the
1178 text after the change. In addition, the output obviously lack
1179 enough information to apply such a patch in reverse, even manually,
1180 hence the name of the option.
1181</p>
Junio C Hamano9629d4f2012-12-19 00:28:271182<div class="paragraph"><p>When used together with <code>-B</code>, omit also the preimage in the deletion part
Junio C Hamanob02377c2011-04-28 22:26:021183of a delete/create pair.</p></div>
1184</dd>
1185<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261186-l&lt;num&gt;
1187</dt>
1188<dd>
1189<p>
Junio C Hamano9629d4f2012-12-19 00:28:271190 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamano60f8aa82007-03-06 09:58:261191 is the number of potential rename/copy targets. This
1192 option prevents rename/copy detection from running if
1193 the number of rename/copy targets exceeds the specified
1194 number.
1195</p>
1196</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591197<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261198-O&lt;orderfile&gt;
1199</dt>
1200<dd>
1201<p>
1202 Output the patch in the order specified in the
1203 &lt;orderfile&gt;, which has one shell glob pattern per line.
1204</p>
1205</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591206<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221207-a
1208</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591209<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261210--text
1211</dt>
1212<dd>
1213<p>
1214 Treat all files as text.
1215</p>
1216</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591217<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261218--ignore-space-at-eol
1219</dt>
1220<dd>
1221<p>
Junio C Hamano3a702342007-12-12 21:34:021222 Ignore changes in whitespace at EOL.
Junio C Hamano60f8aa82007-03-06 09:58:261223</p>
1224</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591225<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221226-b
1227</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591228<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261229--ignore-space-change
1230</dt>
1231<dd>
1232<p>
Junio C Hamano3a702342007-12-12 21:34:021233 Ignore changes in amount of whitespace. This ignores whitespace
1234 at line end, and considers all other sequences of one or
1235 more whitespace characters to be equivalent.
Junio C Hamano60f8aa82007-03-06 09:58:261236</p>
1237</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591238<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221239-w
Junio C Hamano60f8aa82007-03-06 09:58:261240</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591241<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261242--ignore-all-space
1243</dt>
1244<dd>
1245<p>
Junio C Hamano3a702342007-12-12 21:34:021246 Ignore whitespace when comparing lines. This ignores
1247 differences even if one line has whitespace where the other
Junio C Hamano60f8aa82007-03-06 09:58:261248 line has none.
1249</p>
1250</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591251<dt class="hdlist1">
Junio C Hamano1d40ee82009-01-07 10:14:161252--inter-hunk-context=&lt;lines&gt;
1253</dt>
1254<dd>
1255<p>
1256 Show the context between diff hunks, up to the specified number
1257 of lines, thereby fusing hunks that are close to each other.
1258</p>
1259</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591260<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:091261-W
1262</dt>
1263<dt class="hdlist1">
1264--function-context
1265</dt>
1266<dd>
1267<p>
1268 Show whole surrounding functions of changes.
1269</p>
1270</dd>
1271<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401272--ext-diff
1273</dt>
1274<dd>
1275<p>
1276 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:231277 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
1278 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanobb0f4042007-07-04 06:41:401279</p>
1280</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591281<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401282--no-ext-diff
1283</dt>
1284<dd>
1285<p>
1286 Disallow external diff drivers.
1287</p>
1288</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591289<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:311290--textconv
1291</dt>
1292<dt class="hdlist1">
1293--no-textconv
1294</dt>
1295<dd>
1296<p>
1297 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:231298 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:311299 details. Because textconv filters are typically a one-way
1300 conversion, the resulting diff is suitable for human
1301 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:231302 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
1303 <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or
Junio C Hamanoc652aed2011-07-07 01:14:311304 diff plumbing commands.
1305</p>
1306</dd>
1307<dt class="hdlist1">
Junio C Hamano7d449522010-07-01 00:08:511308--ignore-submodules[=&lt;when&gt;]
Junio C Hamanodfccbb02008-05-26 01:16:141309</dt>
1310<dd>
1311<p>
Junio C Hamano7d449522010-07-01 00:08:511312 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamano619596a2010-08-18 22:15:351313 either "none", "untracked", "dirty" or "all", which is the default
1314 Using "none" will consider the submodule modified when it either contains
1315 untracked or modified files or its HEAD differs from the commit recorded
1316 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:231317 <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
Junio C Hamano7d449522010-07-01 00:08:511318 "untracked" is used submodules are not considered dirty when they only
1319 contain untracked content (but they are still scanned for modified
1320 content). Using "dirty" ignores all changes to the work tree of submodules,
1321 only changes to the commits stored in the superproject are shown (this was
1322 the behavior until 1.7.0). Using "all" hides all changes to submodules.
Junio C Hamanodfccbb02008-05-26 01:16:141323</p>
1324</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591325<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331326--src-prefix=&lt;prefix&gt;
1327</dt>
1328<dd>
1329<p>
1330 Show the given source prefix instead of "a/".
1331</p>
1332</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591333<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331334--dst-prefix=&lt;prefix&gt;
1335</dt>
1336<dd>
1337<p>
1338 Show the given destination prefix instead of "b/".
1339</p>
1340</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591341<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331342--no-prefix
1343</dt>
1344<dd>
1345<p>
1346 Do not show any source or destination prefix.
1347</p>
1348</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311349</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591350<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:231351<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591352<div class="dlist"><dl>
1353<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401354-&lt;n&gt;
1355</dt>
1356<dd>
1357<p>
Junio C Hamano3b4609d2010-09-30 00:04:341358 Prepare patches from the topmost &lt;n&gt; commits.
Junio C Hamanobb0f4042007-07-04 06:41:401359</p>
1360</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591361<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471362-o &lt;dir&gt;
1363</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591364<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471365--output-directory &lt;dir&gt;
Junio C Hamano1a4e8412005-12-27 08:17:231366</dt>
1367<dd>
1368<p>
1369 Use &lt;dir&gt; to store the resulting files, instead of the
Junio C Hamano1bab4b02006-06-06 21:58:331370 current working directory.
Junio C Hamano1a4e8412005-12-27 08:17:231371</p>
1372</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591373<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471374-n
1375</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591376<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471377--numbered
Junio C Hamano1a4e8412005-12-27 08:17:231378</dt>
1379<dd>
1380<p>
Junio C Hamano7d06a8a2008-10-20 05:42:331381 Name output in <em>[PATCH n/m]</em> format, even with a single patch.
Junio C Hamano1a4e8412005-12-27 08:17:231382</p>
1383</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591384<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471385-N
1386</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591387<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471388--no-numbered
Junio C Hamano8c5802d2007-11-15 00:13:361389</dt>
1390<dd>
1391<p>
1392 Name output in <em>[PATCH]</em> format.
1393</p>
1394</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591395<dt class="hdlist1">
Junio C Hamano341071d2006-06-04 07:24:481396--start-number &lt;n&gt;
1397</dt>
1398<dd>
1399<p>
1400 Start numbering the patches at &lt;n&gt; instead of 1.
1401</p>
1402</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591403<dt class="hdlist1">
Junio C Hamano94cad1a2007-06-06 10:48:251404--numbered-files
1405</dt>
1406<dd>
1407<p>
1408 Output file names will be a simple number sequence
1409 without the default first line of the commit appended.
Junio C Hamano94cad1a2007-06-06 10:48:251410</p>
1411</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591412<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471413-k
1414</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591415<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471416--keep-subject
Junio C Hamano1a4e8412005-12-27 08:17:231417</dt>
1418<dd>
1419<p>
1420 Do not strip/add <em>[PATCH]</em> from the first line of the
1421 commit log message.
1422</p>
1423</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591424<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471425-s
1426</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591427<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471428--signoff
Junio C Hamano1a4e8412005-12-27 08:17:231429</dt>
1430<dd>
1431<p>
Junio C Hamano9629d4f2012-12-19 00:28:271432 Add <code>Signed-off-by:</code> line to the commit message, using
Junio C Hamano1a4e8412005-12-27 08:17:231433 the committer identity of yourself.
1434</p>
1435</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591436<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231437--stdout
1438</dt>
1439<dd>
1440<p>
Junio C Hamano341071d2006-06-04 07:24:481441 Print all commits to the standard output in mbox format,
1442 instead of creating a file for each one.
Junio C Hamano1a4e8412005-12-27 08:17:231443</p>
1444</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591445<dt class="hdlist1">
Junio C Hamanoc51fede2007-03-12 07:29:201446--attach[=&lt;boundary&gt;]
Junio C Hamano2496ae42006-03-11 08:04:331447</dt>
1448<dd>
1449<p>
Junio C Hamanoc51fede2007-03-12 07:29:201450 Create multipart/mixed attachment, the first part of
1451 which is the commit message and the patch itself in the
Junio C Hamano9629d4f2012-12-19 00:28:271452 second part, with <code>Content-Disposition: attachment</code>.
Junio C Hamanoc51fede2007-03-12 07:29:201453</p>
1454</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591455<dt class="hdlist1">
Junio C Hamano0a235222009-03-06 08:21:091456--no-attach
1457</dt>
1458<dd>
1459<p>
1460 Disable the creation of an attachment, overriding the
1461 configuration setting.
1462</p>
1463</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591464<dt class="hdlist1">
Junio C Hamanoc51fede2007-03-12 07:29:201465--inline[=&lt;boundary&gt;]
1466</dt>
1467<dd>
1468<p>
1469 Create multipart/mixed attachment, the first part of
1470 which is the commit message and the patch itself in the
Junio C Hamano9629d4f2012-12-19 00:28:271471 second part, with <code>Content-Disposition: inline</code>.
Junio C Hamano2496ae42006-03-11 08:04:331472</p>
1473</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591474<dt class="hdlist1">
Junio C Hamanoea6a7642009-03-11 23:56:191475--thread[=&lt;style&gt;]
Junio C Hamanof9ca97d2006-07-25 22:23:091476</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591477<dt class="hdlist1">
Junio C Hamano1bbd0f42009-07-23 06:20:291478--no-thread
1479</dt>
Junio C Hamanof9ca97d2006-07-25 22:23:091480<dd>
1481<p>
Junio C Hamano9629d4f2012-12-19 00:28:271482 Controls addition of <code>In-Reply-To</code> and <code>References</code> headers to
Junio C Hamano1bbd0f42009-07-23 06:20:291483 make the second and subsequent mails appear as replies to the
Junio C Hamano9629d4f2012-12-19 00:28:271484 first. Also controls generation of the <code>Message-Id</code> header to
Junio C Hamano1bbd0f42009-07-23 06:20:291485 reference.
Junio C Hamanof9ca97d2006-07-25 22:23:091486</p>
Junio C Hamano9629d4f2012-12-19 00:28:271487<div class="paragraph"><p>The optional &lt;style&gt; argument can be either <code>shallow</code> or <code>deep</code>.
Junio C Hamanof4581102009-04-25 08:29:591488<em>shallow</em> threading makes every mail a reply to the head of the
Junio C Hamanoea6a7642009-03-11 23:56:191489series, where the head is chosen from the cover letter, the
Junio C Hamano9629d4f2012-12-19 00:28:271490<code>--in-reply-to</code>, and the first patch mail, in this order. <em>deep</em>
Junio C Hamano1bbd0f42009-07-23 06:20:291491threading makes every mail a reply to the previous one.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271492<div class="paragraph"><p>The default is <code>--no-thread</code>, unless the <em>format.thread</em> configuration
1493is set. If <code>--thread</code> is specified without a style, it defaults to the
1494style specified by <em>format.thread</em> if any, or else <code>shallow</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591495<div class="paragraph"><p>Beware that the default for <em>git send-email</em> is to thread emails
Junio C Hamano9629d4f2012-12-19 00:28:271496itself. If you want <code>git format-patch</code> to take care of threading, you
1497will want to ensure that threading is disabled for <code>git send-email</code>.</p></div>
Junio C Hamanof9ca97d2006-07-25 22:23:091498</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591499<dt class="hdlist1">
Junio C Hamanof9ca97d2006-07-25 22:23:091500--in-reply-to=Message-Id
1501</dt>
1502<dd>
1503<p>
Junio C Hamano9629d4f2012-12-19 00:28:271504 Make the first mail (or all the mails with <code>--no-thread</code>) appear as a
Junio C Hamanof9ca97d2006-07-25 22:23:091505 reply to the given Message-Id, which avoids breaking threads to
1506 provide a new patch series.
1507</p>
1508</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591509<dt class="hdlist1">
Junio C Hamano7c73c662007-01-19 00:37:501510--ignore-if-in-upstream
1511</dt>
1512<dd>
1513<p>
1514 Do not include a patch that matches a commit in
1515 &lt;until&gt;..&lt;since&gt;. This will examine all patches reachable
1516 from &lt;since&gt; but not from &lt;until&gt; and compare them with the
1517 patches being generated, and any patch that matches is
1518 ignored.
1519</p>
1520</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591521<dt class="hdlist1">
Junio C Hamano6f1cca82007-04-12 05:02:471522--subject-prefix=&lt;Subject-Prefix&gt;
1523</dt>
1524<dd>
1525<p>
1526 Instead of the standard <em>[PATCH]</em> prefix in the subject
1527 line, instead use <em>[&lt;Subject-Prefix&gt;]</em>. This
1528 allows for useful naming of a patch series, and can be
Junio C Hamano9629d4f2012-12-19 00:28:271529 combined with the <code>--numbered</code> option.
Junio C Hamano6f1cca82007-04-12 05:02:471530</p>
1531</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591532<dt class="hdlist1">
Junio C Hamano7dac6902013-01-12 08:25:311533-v &lt;n&gt;
1534</dt>
1535<dt class="hdlist1">
1536--reroll-count=&lt;n&gt;
1537</dt>
1538<dd>
1539<p>
1540 Mark the series as the &lt;n&gt;-th iteration of the topic. The
1541 output filenames have <code>v&lt;n&gt;</code> pretended to them, and the
1542 subject prefix ("PATCH" by default, but configurable via the
1543 <code>--subject-prefix</code> option) has ` v&lt;n&gt;` appended to it. E.g.
1544 <code>--reroll-count=4</code> may produce <code>v4-0001-add-makefile.patch</code>
1545 file that has "Subject: [PATCH v4 1/20] Add makefile" in it.
1546</p>
1547</dd>
1548<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:551549--to=&lt;email&gt;
1550</dt>
1551<dd>
1552<p>
Junio C Hamano9629d4f2012-12-19 00:28:271553 Add a <code>To:</code> header to the email headers. This is in addition
Junio C Hamanoea90ab32010-03-15 20:32:551554 to any configured headers, and may be used multiple times.
Junio C Hamano9629d4f2012-12-19 00:28:271555 The negated form <code>--no-to</code> discards all <code>To:</code> headers added so
Junio C Hamano7bd050f2011-09-22 06:32:221556 far (from config or command line).
Junio C Hamanoea90ab32010-03-15 20:32:551557</p>
1558</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591559<dt class="hdlist1">
Junio C Hamano24bc09a2008-02-28 00:27:441560--cc=&lt;email&gt;
1561</dt>
1562<dd>
1563<p>
Junio C Hamano9629d4f2012-12-19 00:28:271564 Add a <code>Cc:</code> header to the email headers. This is in addition
Junio C Hamano24bc09a2008-02-28 00:27:441565 to any configured headers, and may be used multiple times.
Junio C Hamano9629d4f2012-12-19 00:28:271566 The negated form <code>--no-cc</code> discards all <code>Cc:</code> headers added so
Junio C Hamano7bd050f2011-09-22 06:32:221567 far (from config or command line).
Junio C Hamano24bc09a2008-02-28 00:27:441568</p>
1569</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591570<dt class="hdlist1">
Junio C Hamano9572e922009-04-02 06:52:031571--add-header=&lt;header&gt;
1572</dt>
1573<dd>
1574<p>
1575 Add an arbitrary header to the email headers. This is in addition
1576 to any configured headers, and may be used multiple times.
Junio C Hamano9629d4f2012-12-19 00:28:271577 For example, <code>--add-header="Organization: git-foo"</code>.
1578 The negated form <code>--no-add-header</code> discards <strong>all</strong> (<code>To:</code>,
1579 <code>Cc:</code>, and custom) headers added so far from config or command
Junio C Hamano7bd050f2011-09-22 06:32:221580 line.
Junio C Hamano9572e922009-04-02 06:52:031581</p>
1582</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591583<dt class="hdlist1">
Junio C Hamano24bc09a2008-02-28 00:27:441584--cover-letter
1585</dt>
1586<dd>
1587<p>
Junio C Hamano92a4abd2008-08-15 05:34:441588 In addition to the patches, generate a cover letter file
1589 containing the shortlog and the overall diffstat. You can
1590 fill in a description in the file before sending it out.
Junio C Hamano24bc09a2008-02-28 00:27:441591</p>
1592</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591593<dt class="hdlist1">
Junio C Hamano4eb2b9c2012-11-15 21:12:291594--notes[=&lt;ref&gt;]
1595</dt>
1596<dd>
1597<p>
1598 Append the notes (see <a href="git-notes.html">git-notes(1)</a>) for the commit
1599 after the three-dash line.
1600</p>
1601<div class="paragraph"><p>The expected use case of this is to write supporting explanation for
1602the commit that does not belong to the commit log message proper,
1603and include it with the patch submission. While one can simply write
Junio C Hamano9629d4f2012-12-19 00:28:271604these explanations after <code>format-patch</code> has run but before sending,
Junio C Hamano076ffcc2013-02-06 05:13:211605keeping them as Git notes allows them to be maintained between versions
Junio C Hamano9629d4f2012-12-19 00:28:271606of the patch series (but see the discussion of the <code>notes.rewrite</code>
Junio C Hamano4eb2b9c2012-11-15 21:12:291607configuration options in <a href="git-notes.html">git-notes(1)</a> to use this workflow).</p></div>
1608</dd>
1609<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551610--[no]-signature=&lt;signature&gt;
1611</dt>
1612<dd>
1613<p>
1614 Add a signature to each message produced. Per RFC 3676 the signature
Junio C Hamano68cf15a2010-11-06 01:01:591615 is separated from the body by a line with '-- ' on it. If the
Junio C Hamano076ffcc2013-02-06 05:13:211616 signature option is omitted the signature defaults to the Git version
Junio C Hamano89a57342010-06-22 23:22:551617 number.
1618</p>
1619</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591620<dt class="hdlist1">
Junio C Hamano4f9a6052007-01-17 20:25:161621--suffix=.&lt;sfx&gt;
1622</dt>
1623<dd>
1624<p>
Junio C Hamano9629d4f2012-12-19 00:28:271625 Instead of using <code>.patch</code> as the suffix for generated
Junio C Hamanoa6387422007-08-25 03:54:271626 filenames, use specified suffix. A common alternative is
Junio C Hamano9629d4f2012-12-19 00:28:271627 <code>--suffix=.txt</code>. Leaving this empty will remove the <code>.patch</code>
Junio C Hamanof4581102009-04-25 08:29:591628 suffix.
Junio C Hamano4f9a6052007-01-17 20:25:161629</p>
Junio C Hamano68cf15a2010-11-06 01:01:591630<div class="paragraph"><p>Note that the leading character does not have to be a dot; for example,
Junio C Hamano9629d4f2012-12-19 00:28:271631you can use <code>--suffix=-patch</code> to get <code>0001-description-of-my-change-patch</code>.</p></div>
Junio C Hamano4f9a6052007-01-17 20:25:161632</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591633<dt class="hdlist1">
Junio C Hamano209ebe82011-04-27 21:09:591634--quiet
1635</dt>
1636<dd>
1637<p>
1638 Do not print the names of the generated files to standard output.
1639</p>
1640</dd>
1641<dt class="hdlist1">
Junio C Hamano869bb802008-05-12 00:29:471642--no-binary
1643</dt>
1644<dd>
1645<p>
Junio C Hamanof4581102009-04-25 08:29:591646 Do not output contents of changes in binary files, instead
1647 display a notice that those files changed. Patches generated
1648 using this option cannot be applied properly, but they are
1649 still useful for code review.
Junio C Hamano869bb802008-05-12 00:29:471650</p>
1651</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591652<dt class="hdlist1">
Junio C Hamano9572e922009-04-02 06:52:031653--root
1654</dt>
1655<dd>
1656<p>
1657 Treat the revision argument as a &lt;revision range&gt;, even if it
1658 is just a single commit (that would normally be treated as a
1659 &lt;since&gt;). Note that root commits included in the specified
1660 range are always formatted as creation patches, independently
1661 of this flag.
1662</p>
1663</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311664</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231665</div>
Junio C Hamano9629d4f2012-12-19 00:28:271666</div>
1667<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311668<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamano2496ae42006-03-11 08:04:331669<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591670<div class="paragraph"><p>You can specify extra mail header lines to be added to each message,
Junio C Hamanof4581102009-04-25 08:29:591671defaults for the subject prefix and file suffix, number patches when
Junio C Hamanoea90ab32010-03-15 20:32:551672outputting more than one patch, add "To" or "Cc:" headers, configure
1673attachments, and sign off patches with configuration variables.</p></div>
Junio C Hamano7c73c662007-01-19 00:37:501674<div class="listingblock">
Junio C Hamano2496ae42006-03-11 08:04:331675<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271676<pre><code>[format]
Junio C Hamano7c73c662007-01-19 00:37:501677 headers = "Organization: git-foo\n"
Junio C Hamano1d90cb02007-07-03 07:05:311678 subjectprefix = CHANGE
Junio C Hamano8c5802d2007-11-15 00:13:361679 suffix = .txt
Junio C Hamano2fbcd212008-05-14 22:26:071680 numbered = auto
Junio C Hamanoea90ab32010-03-15 20:32:551681 to = &lt;email&gt;
Junio C Hamano0a235222009-03-06 08:21:091682 cc = &lt;email&gt;
Junio C Hamano5f9a6f02009-04-06 08:26:561683 attach [ = mime-boundary-string ]
Junio C Hamano9629d4f2012-12-19 00:28:271684 signoff = true</code></pre>
Junio C Hamano4f9a6052007-01-17 20:25:161685</div></div>
Junio C Hamano2496ae42006-03-11 08:04:331686</div>
Junio C Hamano9629d4f2012-12-19 00:28:271687</div>
1688<div class="sect1">
Junio C Hamanob77f8192011-05-05 01:30:381689<h2 id="_discussion">DISCUSSION</h2>
1690<div class="sectionbody">
1691<div class="paragraph"><p>The patch produced by <em>git format-patch</em> is in UNIX mailbox format,
1692with a fixed "magic" time stamp to indicate that the file is output
1693from format-patch rather than a real mailbox, like so:</p></div>
1694<div class="listingblock">
1695<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271696<pre><code>From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001
Junio C Hamanob77f8192011-05-05 01:30:381697From: Tony Luck &lt;tony.luck@intel.com&gt;
1698Date: Tue, 13 Jul 2010 11:42:54 -0700
1699Subject: [PATCH] =?UTF-8?q?[IA64]=20Put=20ia64=20config=20files=20on=20the=20?=
1700 =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?=
1701MIME-Version: 1.0
1702Content-Type: text/plain; charset=UTF-8
1703Content-Transfer-Encoding: 8bit
1704
1705arch/arm config files were slimmed down using a python script
1706(See commit c2330e286f68f1c408b4aa6515ba49d57f05beae comment)
1707
1708Do the same for ia64 so we can have sleek &amp; trim looking
Junio C Hamano9629d4f2012-12-19 00:28:271709...</code></pre>
Junio C Hamanob77f8192011-05-05 01:30:381710</div></div>
1711<div class="paragraph"><p>Typically it will be placed in a MUA&#8217;s drafts folder, edited to add
1712timely commentary that should not go in the changelog after the three
1713dashes, and then sent as a message whose body, in our example, starts
1714with "arch/arm config files were&#8230;". On the receiving end, readers
1715can save interesting patches in a UNIX mailbox and apply them with
Junio C Hamanoa28a9202012-06-21 07:08:231716<a href="git-am.html">git-am(1)</a>.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381717<div class="paragraph"><p>When a patch is part of an ongoing discussion, the patch generated by
1718<em>git format-patch</em> can be tweaked to take advantage of the <em>git am
1719--scissors</em> feature. After your response to the discussion comes a
Junio C Hamano9629d4f2012-12-19 00:28:271720line that consists solely of "<code>-- &gt;8 --</code>" (scissors and perforation),
Junio C Hamanob77f8192011-05-05 01:30:381721followed by the patch with unnecessary header fields removed:</p></div>
1722<div class="listingblock">
1723<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271724<pre><code>...
Junio C Hamanob77f8192011-05-05 01:30:381725&gt; So we should do such-and-such.
1726
1727Makes sense to me. How about this patch?
1728
1729-- &gt;8 --
1730Subject: [IA64] Put ia64 config files on the Uwe Kleine-König diet
1731
1732arch/arm config files were slimmed down using a python script
Junio C Hamano9629d4f2012-12-19 00:28:271733...</code></pre>
Junio C Hamanob77f8192011-05-05 01:30:381734</div></div>
1735<div class="paragraph"><p>When sending a patch this way, most often you are sending your own
Junio C Hamano9629d4f2012-12-19 00:28:271736patch, so in addition to the "<code>From $SHA1 $magic_timestamp</code>" marker you
1737should omit <code>From:</code> and <code>Date:</code> lines from the patch file. The patch
Junio C Hamanob77f8192011-05-05 01:30:381738title is likely to be different from the subject of the discussion the
1739patch is in response to, so it is likely that you would want to keep
1740the Subject: line, like the example above.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271741<div class="sect2">
1742<h3 id="_checking_for_patch_corruption">Checking for patch corruption</h3>
Junio C Hamanob77f8192011-05-05 01:30:381743<div class="paragraph"><p>Many mailers if not set up properly will corrupt whitespace. Here are
1744two common types of corruption:</p></div>
1745<div class="ulist"><ul>
1746<li>
1747<p>
1748Empty context lines that do not have <em>any</em> whitespace.
1749</p>
1750</li>
1751<li>
1752<p>
1753Non-empty context lines that have one extra whitespace at the
1754 beginning.
1755</p>
1756</li>
1757</ul></div>
1758<div class="paragraph"><p>One way to test if your MUA is set up correctly is:</p></div>
1759<div class="ulist"><ul>
1760<li>
1761<p>
1762Send the patch to yourself, exactly the way you would, except
1763 with To: and Cc: lines that do not contain the list and
1764 maintainer address.
1765</p>
1766</li>
1767<li>
1768<p>
1769Save that patch to a file in UNIX mailbox format. Call it a.patch,
1770 say.
1771</p>
1772</li>
1773<li>
1774<p>
1775Apply it:
1776</p>
1777<div class="literalblock">
1778<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271779<pre><code>$ git fetch &lt;project&gt; master:test-apply
Junio C Hamanob77f8192011-05-05 01:30:381780$ git checkout test-apply
1781$ git reset --hard
Junio C Hamano9629d4f2012-12-19 00:28:271782$ git am a.patch</code></pre>
Junio C Hamanob77f8192011-05-05 01:30:381783</div></div>
1784</li>
1785</ul></div>
1786<div class="paragraph"><p>If it does not apply correctly, there can be various reasons.</p></div>
1787<div class="ulist"><ul>
1788<li>
1789<p>
1790The patch itself does not apply cleanly. That is <em>bad</em> but
1791 does not have much to do with your MUA. You might want to rebase
Junio C Hamanoa28a9202012-06-21 07:08:231792 the patch with <a href="git-rebase.html">git-rebase(1)</a> before regenerating it in
Junio C Hamanob77f8192011-05-05 01:30:381793 this case.
1794</p>
1795</li>
1796<li>
1797<p>
1798The MUA corrupted your patch; "am" would complain that
1799 the patch does not apply. Look in the .git/rebase-apply/ subdirectory and
1800 see what <em>patch</em> file contains and check for the common
1801 corruption patterns mentioned above.
1802</p>
1803</li>
1804<li>
1805<p>
1806While at it, check the <em>info</em> and <em>final-commit</em> files as well.
1807 If what is in <em>final-commit</em> is not exactly what you would want to
1808 see in the commit log message, it is very likely that the
1809 receiver would end up hand editing the log message when applying
1810 your patch. Things like "Hi, this is my first patch.\n" in the
1811 patch e-mail should come after the three-dash line that signals
1812 the end of the commit message.
1813</p>
1814</li>
1815</ul></div>
1816</div>
Junio C Hamano9629d4f2012-12-19 00:28:271817</div>
1818</div>
1819<div class="sect1">
Junio C Hamanob77f8192011-05-05 01:30:381820<h2 id="_mua_specific_hints">MUA-SPECIFIC HINTS</h2>
1821<div class="sectionbody">
1822<div class="paragraph"><p>Here are some hints on how to successfully submit patches inline using
1823various mailers.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271824<div class="sect2">
1825<h3 id="_gmail">GMail</h3>
Junio C Hamanob77f8192011-05-05 01:30:381826<div class="paragraph"><p>GMail does not have any way to turn off line wrapping in the web
1827interface, so it will mangle any emails that you send. You can however
1828use "git send-email" and send your patches through the GMail SMTP server, or
1829use any IMAP email client to connect to the google IMAP server and forward
1830the emails through that.</p></div>
1831<div class="paragraph"><p>For hints on using <em>git send-email</em> to send your patches through the
Junio C Hamanoa28a9202012-06-21 07:08:231832GMail SMTP server, see the EXAMPLE section of <a href="git-send-email.html">git-send-email(1)</a>.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381833<div class="paragraph"><p>For hints on submission using the IMAP interface, see the EXAMPLE
Junio C Hamanoa28a9202012-06-21 07:08:231834section of <a href="git-imap-send.html">git-imap-send(1)</a>.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271835</div>
1836<div class="sect2">
1837<h3 id="_thunderbird">Thunderbird</h3>
Junio C Hamanob77f8192011-05-05 01:30:381838<div class="paragraph"><p>By default, Thunderbird will both wrap emails as well as flag
1839them as being <em>format=flowed</em>, both of which will make the
Junio C Hamano076ffcc2013-02-06 05:13:211840resulting email unusable by Git.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381841<div class="paragraph"><p>There are three different approaches: use an add-on to turn off line wraps,
1842configure Thunderbird to not mangle patches, or use
1843an external editor to keep Thunderbird from mangling the patches.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271844<div class="sect3">
Junio C Hamanob77f8192011-05-05 01:30:381845<h4 id="_approach_1_add_on">Approach #1 (add-on)</h4>
1846<div class="paragraph"><p>Install the Toggle Word Wrap add-on that is available from
1847<a href="https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/">https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/</a>
1848It adds a menu entry "Enable Word Wrap" in the composer&#8217;s "Options" menu
1849that you can tick off. Now you can compose the message as you otherwise do
1850(cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc), but you have to
1851insert line breaks manually in any text that you type.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271852</div>
1853<div class="sect3">
Junio C Hamanob77f8192011-05-05 01:30:381854<h4 id="_approach_2_configuration">Approach #2 (configuration)</h4>
1855<div class="paragraph"><p>Three steps:</p></div>
1856<div class="olist arabic"><ol class="arabic">
1857<li>
1858<p>
1859Configure your mail server composition as plain text:
1860 Edit&#8230;Account Settings&#8230;Composition &amp; Addressing,
1861 uncheck "Compose Messages in HTML".
1862</p>
1863</li>
1864<li>
1865<p>
1866Configure your general composition window to not wrap.
1867</p>
1868<div class="paragraph"><p>In Thunderbird 2:
1869Edit..Preferences..Composition, wrap plain text messages at 0</p></div>
1870<div class="paragraph"><p>In Thunderbird 3:
1871Edit..Preferences..Advanced..Config Editor. Search for
1872"mail.wrap_long_lines".
Junio C Hamano9629d4f2012-12-19 00:28:271873Toggle it to make sure it is set to <code>false</code>.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381874</li>
1875<li>
1876<p>
1877Disable the use of format=flowed:
1878Edit..Preferences..Advanced..Config Editor. Search for
1879"mailnews.send_plaintext_flowed".
Junio C Hamano9629d4f2012-12-19 00:28:271880Toggle it to make sure it is set to <code>false</code>.
Junio C Hamanob77f8192011-05-05 01:30:381881</p>
1882</li>
1883</ol></div>
1884<div class="paragraph"><p>After that is done, you should be able to compose email as you
1885otherwise would (cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc),
1886and the patches will not be mangled.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271887</div>
1888<div class="sect3">
Junio C Hamanob77f8192011-05-05 01:30:381889<h4 id="_approach_3_external_editor">Approach #3 (external editor)</h4>
1890<div class="paragraph"><p>The following Thunderbird extensions are needed:
1891AboutConfig from <a href="http://aboutconfig.mozdev.org/">http://aboutconfig.mozdev.org/</a> and
1892External Editor from <a href="http://globs.org/articles.php?lng=en&amp;pg=8">http://globs.org/articles.php?lng=en&amp;pg=8</a></p></div>
1893<div class="olist arabic"><ol class="arabic">
1894<li>
1895<p>
1896Prepare the patch as a text file using your method of choice.
1897</p>
1898</li>
1899<li>
1900<p>
1901Before opening a compose window, use Edit&#8594;Account Settings to
1902 uncheck the "Compose messages in HTML format" setting in the
1903 "Composition &amp; Addressing" panel of the account to be used to
1904 send the patch.
1905</p>
1906</li>
1907<li>
1908<p>
1909In the main Thunderbird window, <em>before</em> you open the compose
1910 window for the patch, use Tools&#8594;about:config to set the
1911 following to the indicated values:
1912</p>
1913<div class="listingblock">
1914<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271915<pre><code> mailnews.send_plaintext_flowed =&gt; false
1916 mailnews.wraplength =&gt; 0</code></pre>
Junio C Hamanob77f8192011-05-05 01:30:381917</div></div>
1918</li>
1919<li>
1920<p>
1921Open a compose window and click the external editor icon.
1922</p>
1923</li>
1924<li>
1925<p>
1926In the external editor window, read in the patch file and exit
1927 the editor normally.
1928</p>
1929</li>
1930</ol></div>
1931<div class="paragraph"><p>Side note: it may be possible to do step 2 with
1932about:config and the following settings but no one&#8217;s tried yet.</p></div>
1933<div class="listingblock">
1934<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271935<pre><code> mail.html_compose =&gt; false
Junio C Hamanob77f8192011-05-05 01:30:381936 mail.identity.default.compose_html =&gt; false
Junio C Hamano9629d4f2012-12-19 00:28:271937 mail.identity.id?.compose_html =&gt; false</code></pre>
Junio C Hamanob77f8192011-05-05 01:30:381938</div></div>
1939<div class="paragraph"><p>There is a script in contrib/thunderbird-patch-inline which can help
1940you include patches with Thunderbird in an easy way. To use it, do the
1941steps above and then use the script as the external editor.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271942</div>
1943</div>
1944<div class="sect2">
1945<h3 id="_kmail">KMail</h3>
Junio C Hamanob77f8192011-05-05 01:30:381946<div class="paragraph"><p>This should help you to submit patches inline using KMail.</p></div>
1947<div class="olist arabic"><ol class="arabic">
1948<li>
1949<p>
1950Prepare the patch as a text file.
1951</p>
1952</li>
1953<li>
1954<p>
1955Click on New Mail.
1956</p>
1957</li>
1958<li>
1959<p>
1960Go under "Options" in the Composer window and be sure that
1961 "Word wrap" is not set.
1962</p>
1963</li>
1964<li>
1965<p>
1966Use Message &#8594; Insert file&#8230; and insert the patch.
1967</p>
1968</li>
1969<li>
1970<p>
1971Back in the compose window: add whatever other text you wish to the
1972 message, complete the addressing and subject fields, and press send.
1973</p>
1974</li>
1975</ol></div>
1976</div>
Junio C Hamano9629d4f2012-12-19 00:28:271977</div>
1978</div>
1979<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311980<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231981<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591982<div class="ulist"><ul>
Junio C Hamano6d76d612008-05-09 05:46:081983<li>
Junio C Hamano1a4e8412005-12-27 08:17:231984<p>
Junio C Hamano6d76d612008-05-09 05:46:081985Extract commits between revisions R1 and R2, and apply them on top of
Junio C Hamano1aa40d22010-01-21 17:46:431986the current branch using <em>git am</em> to cherry-pick them:
Junio C Hamano1a4e8412005-12-27 08:17:231987</p>
Junio C Hamano6d76d612008-05-09 05:46:081988<div class="listingblock">
1989<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271990<pre><code>$ git format-patch -k --stdout R1..R2 | git am -3 -k</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:081991</div></div>
1992</li>
1993<li>
Junio C Hamano1a4e8412005-12-27 08:17:231994<p>
Junio C Hamano6d76d612008-05-09 05:46:081995Extract all commits which are in the current branch but not in the
1996origin branch:
Junio C Hamano1a4e8412005-12-27 08:17:231997</p>
Junio C Hamano6d76d612008-05-09 05:46:081998<div class="listingblock">
1999<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272000<pre><code>$ git format-patch origin</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:082001</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592002<div class="paragraph"><p>For each commit a separate file is created in the current directory.</p></div>
Junio C Hamano6d76d612008-05-09 05:46:082003</li>
2004<li>
Junio C Hamano7d9e9bd2007-08-29 07:31:472005<p>
Junio C Hamano6d76d612008-05-09 05:46:082006Extract all commits that lead to <em>origin</em> since the inception of the
2007project:
Junio C Hamano7d9e9bd2007-08-29 07:31:472008</p>
Junio C Hamano6d76d612008-05-09 05:46:082009<div class="listingblock">
2010<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272011<pre><code>$ git format-patch --root origin</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:082012</div></div>
2013</li>
2014<li>
Junio C Hamano1a4e8412005-12-27 08:17:232015<p>
Junio C Hamano6d76d612008-05-09 05:46:082016The same as the previous one:
Junio C Hamano1a4e8412005-12-27 08:17:232017</p>
Junio C Hamano6d76d612008-05-09 05:46:082018<div class="listingblock">
2019<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272020<pre><code>$ git format-patch -M -B origin</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:082021</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592022<div class="paragraph"><p>Additionally, it detects and handles renames and complete rewrites
Junio C Hamano6d76d612008-05-09 05:46:082023intelligently to produce a renaming patch. A renaming patch reduces
Junio C Hamanof4581102009-04-25 08:29:592024the amount of text output, and generally makes it easier to review.
Junio C Hamano076ffcc2013-02-06 05:13:212025Note that non-Git "patch" programs won&#8217;t understand renaming patches, so
2026use it only when you know the recipient uses Git to apply your patch.</p></div>
Junio C Hamano6d76d612008-05-09 05:46:082027</li>
2028<li>
Junio C Hamano7c73c662007-01-19 00:37:502029<p>
Junio C Hamano6d76d612008-05-09 05:46:082030Extract three topmost commits from the current branch and format them
2031as e-mailable patches:
Junio C Hamano7c73c662007-01-19 00:37:502032</p>
Junio C Hamano6d76d612008-05-09 05:46:082033<div class="listingblock">
2034<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272035<pre><code>$ git format-patch -3</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:082036</div></div>
2037</li>
Junio C Hamanoba4b9282008-07-06 05:20:312038</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:232039</div>
Junio C Hamano9629d4f2012-12-19 00:28:272040</div>
2041<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312042<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232043<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232044<div class="paragraph"><p><a href="git-am.html">git-am(1)</a>, <a href="git-send-email.html">git-send-email(1)</a></p></div>
Junio C Hamano1a4e8412005-12-27 08:17:232045</div>
Junio C Hamano9629d4f2012-12-19 00:28:272046</div>
2047<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312048<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232049<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232050<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:232051</div>
Junio C Hamano7bd050f2011-09-22 06:32:222052</div>
Junio C Hamano9629d4f2012-12-19 00:28:272053</div>
Junio C Hamano7bd050f2011-09-22 06:32:222054<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:232055<div id="footer">
2056<div id="footer-text">
Junio C Hamano076ffcc2013-02-06 05:13:212057Last updated 2013-02-05 21:07:26 PST
Junio C Hamano1a4e8412005-12-27 08:17:232058</div>
2059</div>
2060</body>
2061</html>