blob: 94e185d14f0d0f8f19fc4aedb487db11d483b618 [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" />
Junio C Hamano61525f92014-01-17 22:46:496<meta name="generator" content="AsciiDoc 8.6.6" />
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 Hamano61525f92014-01-17 22:46:4990pre {
Junio C Hamano1a4e8412005-12-27 08:17:2391 padding: 0;
92 margin: 0;
93}
94
Junio C Hamano9629d4f2012-12-19 00:28:2795#author {
Junio C Hamano1a4e8412005-12-27 08:17:2396 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2397 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3198 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:2399}
Junio C Hamano9629d4f2012-12-19 00:28:27100#email {
Junio C Hamano1a4e8412005-12-27 08:17:23101}
Junio C Hamano9629d4f2012-12-19 00:28:27102#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23103}
104
Junio C Hamano9629d4f2012-12-19 00:28:27105#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23106 font-size: small;
107 border-top: 2px solid silver;
108 padding-top: 0.5em;
109 margin-top: 4.0em;
110}
Junio C Hamano9629d4f2012-12-19 00:28:27111#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23112 float: left;
113 padding-bottom: 0.5em;
114}
Junio C Hamano9629d4f2012-12-19 00:28:27115#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: right;
117 padding-bottom: 0.5em;
118}
119
Junio C Hamano9629d4f2012-12-19 00:28:27120#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
123}
Junio C Hamano9629d4f2012-12-19 00:28:27124div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23125div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
126div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22127 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23128 margin-bottom: 1.5em;
129}
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 2.0em;
132 margin-bottom: 2.0em;
133 margin-right: 10%;
134 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23135}
136
137div.content { /* Block element content. */
138 padding: 0;
139}
140
141/* Block element titles. */
142div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59143 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23144 font-weight: bold;
145 text-align: left;
146 margin-top: 1.0em;
147 margin-bottom: 0.5em;
148}
149div.title + * {
150 margin-top: 0;
151}
152
153td div.title:first-child {
154 margin-top: 0.0em;
155}
156div.content div.title:first-child {
157 margin-top: 0.0em;
158}
159div.content + div.title {
160 margin-top: 0.0em;
161}
162
163div.sidebarblock > div.content {
164 background: #ffffee;
Junio C Hamano9629d4f2012-12-19 00:28:27165 border: 1px solid #dddddd;
166 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23167 padding: 0.5em;
168}
169
170div.listingblock > div.content {
Junio C Hamano9629d4f2012-12-19 00:28:27171 border: 1px solid #dddddd;
172 border-left: 5px solid #f0f0f0;
173 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23174 padding: 0.5em;
175}
176
Junio C Hamano7bd050f2011-09-22 06:32:22177div.quoteblock, div.verseblock {
178 padding-left: 1.0em;
179 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59180 margin-right: 10%;
Junio C Hamano9629d4f2012-12-19 00:28:27181 border-left: 5px solid #f0f0f0;
182 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23183}
Junio C Hamano7bd050f2011-09-22 06:32:22184
Junio C Hamano68cf15a2010-11-06 01:01:59185div.quoteblock > div.attribution {
186 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23187 text-align: right;
188}
Junio C Hamano68cf15a2010-11-06 01:01:59189
Junio C Hamano9629d4f2012-12-19 00:28:27190div.verseblock > pre.content {
191 font-family: inherit;
192 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59193}
194div.verseblock > div.attribution {
195 padding-top: 0.75em;
196 text-align: left;
197}
198/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31199div.verseblock + div.attribution {
200 text-align: left;
201}
Junio C Hamano1a4e8412005-12-27 08:17:23202
203div.admonitionblock .icon {
204 vertical-align: top;
205 font-size: 1.1em;
206 font-weight: bold;
207 text-decoration: underline;
208 color: #527bbd;
209 padding-right: 0.5em;
210}
211div.admonitionblock td.content {
212 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22213 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23214}
215
216div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
218 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23219}
220
Junio C Hamano1a4e8412005-12-27 08:17:23221div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23222span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59223a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23224
225dl {
226 margin-top: 0.8em;
227 margin-bottom: 0.8em;
228}
229dt {
230 margin-top: 0.5em;
231 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59232 font-style: normal;
233 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23234}
235dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59236 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23237}
238
239ul, ol {
240 list-style-position: outside;
241}
Junio C Hamano68cf15a2010-11-06 01:01:59242ol.arabic {
243 list-style-type: decimal;
244}
245ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23246 list-style-type: lower-alpha;
247}
Junio C Hamano68cf15a2010-11-06 01:01:59248ol.upperalpha {
249 list-style-type: upper-alpha;
250}
251ol.lowerroman {
252 list-style-type: lower-roman;
253}
254ol.upperroman {
255 list-style-type: upper-roman;
256}
257
258div.compact ul, div.compact ol,
259div.compact p, div.compact p,
260div.compact div, div.compact div {
261 margin-top: 0.1em;
262 margin-bottom: 0.1em;
263}
Junio C Hamano1a4e8412005-12-27 08:17:23264
Junio C Hamano1a4e8412005-12-27 08:17:23265tfoot {
266 font-weight: bold;
267}
Junio C Hamano68cf15a2010-11-06 01:01:59268td > div.verse {
269 white-space: pre;
270}
Junio C Hamano68cf15a2010-11-06 01:01:59271
272div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23273 margin-top: 0.8em;
274 margin-bottom: 0.8em;
275}
Junio C Hamano68cf15a2010-11-06 01:01:59276div.hdlist tr {
277 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31278}
Junio C Hamano68cf15a2010-11-06 01:01:59279dt.hdlist1.strong, td.hdlist1.strong {
280 font-weight: bold;
281}
282td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23283 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59284 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23285 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59286 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23287}
Junio C Hamano68cf15a2010-11-06 01:01:59288td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23289 vertical-align: top;
290}
Junio C Hamano68cf15a2010-11-06 01:01:59291div.hdlist.compact tr {
292 margin: 0;
293 padding-bottom: 0;
294}
295
296.comment {
297 background: yellow;
298}
Junio C Hamano1a4e8412005-12-27 08:17:23299
Junio C Hamano7bd050f2011-09-22 06:32:22300.footnote, .footnoteref {
301 font-size: 0.8em;
302}
303
304span.footnote, span.footnoteref {
305 vertical-align: super;
306}
307
308#footnotes {
309 margin: 20px 0 20px 0;
310 padding: 7px 0 0 0;
311}
312
313#footnotes div.footnote {
314 margin: 0 0 5px 0;
315}
316
317#footnotes hr {
318 border: none;
319 border-top: 1px solid silver;
320 height: 1px;
321 text-align: left;
322 margin-left: 0;
323 width: 20%;
324 min-width: 100px;
325}
326
Junio C Hamano9629d4f2012-12-19 00:28:27327div.colist td {
328 padding-right: 0.5em;
329 padding-bottom: 0.3em;
330 vertical-align: top;
331}
332div.colist td img {
333 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23334}
Junio C Hamanoba4b9282008-07-06 05:20:31335
Junio C Hamano9629d4f2012-12-19 00:28:27336@media print {
337 #footer-badges { display: none; }
338}
339
340#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22341 margin-bottom: 2.5em;
342}
343
Junio C Hamano9629d4f2012-12-19 00:28:27344#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31345 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31346 font-size: 1.1em;
347 font-weight: bold;
348 margin-top: 1.0em;
349 margin-bottom: 0.1em;
350}
351
Junio C Hamano61525f92014-01-17 22:46:49352div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31353 margin-top: 0;
354 margin-bottom: 0;
355}
356div.toclevel2 {
357 margin-left: 2em;
358 font-size: 0.9em;
359}
360div.toclevel3 {
361 margin-left: 4em;
362 font-size: 0.9em;
363}
364div.toclevel4 {
365 margin-left: 6em;
366 font-size: 0.9em;
367}
Junio C Hamano9629d4f2012-12-19 00:28:27368
369span.aqua { color: aqua; }
370span.black { color: black; }
371span.blue { color: blue; }
372span.fuchsia { color: fuchsia; }
373span.gray { color: gray; }
374span.green { color: green; }
375span.lime { color: lime; }
376span.maroon { color: maroon; }
377span.navy { color: navy; }
378span.olive { color: olive; }
379span.purple { color: purple; }
380span.red { color: red; }
381span.silver { color: silver; }
382span.teal { color: teal; }
383span.white { color: white; }
384span.yellow { color: yellow; }
385
386span.aqua-background { background: aqua; }
387span.black-background { background: black; }
388span.blue-background { background: blue; }
389span.fuchsia-background { background: fuchsia; }
390span.gray-background { background: gray; }
391span.green-background { background: green; }
392span.lime-background { background: lime; }
393span.maroon-background { background: maroon; }
394span.navy-background { background: navy; }
395span.olive-background { background: olive; }
396span.purple-background { background: purple; }
397span.red-background { background: red; }
398span.silver-background { background: silver; }
399span.teal-background { background: teal; }
400span.white-background { background: white; }
401span.yellow-background { background: yellow; }
402
403span.big { font-size: 2em; }
404span.small { font-size: 0.6em; }
405
406span.underline { text-decoration: underline; }
407span.overline { text-decoration: overline; }
408span.line-through { text-decoration: line-through; }
409
Junio C Hamano9629d4f2012-12-19 00:28:27410
411/*
412 * xhtml11 specific
413 *
414 * */
415
Junio C Hamano61525f92014-01-17 22:46:49416tt {
417 font-family: monospace;
418 font-size: inherit;
419 color: navy;
420}
421
Junio C Hamano9629d4f2012-12-19 00:28:27422div.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
Junio C Hamano61525f92014-01-17 22:46:49455.monospaced {
456 font-family: monospace;
457 font-size: inherit;
458 color: navy;
459}
460
Junio C Hamano9629d4f2012-12-19 00:28:27461table.tableblock {
462 margin-top: 1.0em;
463 margin-bottom: 1.5em;
464}
465thead, p.tableblock.header {
466 font-weight: bold;
467 color: #527bbd;
468}
469p.tableblock {
470 margin-top: 0;
471}
472table.tableblock {
473 border-width: 3px;
474 border-spacing: 0px;
475 border-style: solid;
476 border-color: #527bbd;
477 border-collapse: collapse;
478}
479th.tableblock, td.tableblock {
480 border-width: 1px;
481 padding: 4px;
482 border-style: solid;
483 border-color: #527bbd;
484}
485
486table.tableblock.frame-topbot {
487 border-left-style: hidden;
488 border-right-style: hidden;
489}
490table.tableblock.frame-sides {
491 border-top-style: hidden;
492 border-bottom-style: hidden;
493}
494table.tableblock.frame-none {
495 border-style: hidden;
496}
497
498th.tableblock.halign-left, td.tableblock.halign-left {
499 text-align: left;
500}
501th.tableblock.halign-center, td.tableblock.halign-center {
502 text-align: center;
503}
504th.tableblock.halign-right, td.tableblock.halign-right {
505 text-align: right;
506}
507
508th.tableblock.valign-top, td.tableblock.valign-top {
509 vertical-align: top;
510}
511th.tableblock.valign-middle, td.tableblock.valign-middle {
512 vertical-align: middle;
513}
514th.tableblock.valign-bottom, td.tableblock.valign-bottom {
515 vertical-align: bottom;
516}
517
518
519/*
520 * manpage specific
521 *
522 * */
523
524body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 padding-top: 0.5em;
526 padding-bottom: 0.5em;
527 border-top: 2px solid silver;
528 border-bottom: 2px solid silver;
529}
Junio C Hamano9629d4f2012-12-19 00:28:27530body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59531 border-style: none;
532}
Junio C Hamano9629d4f2012-12-19 00:28:27533body.manpage div.sectionbody {
534 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59535}
536
537@media print {
Junio C Hamano9629d4f2012-12-19 00:28:27538 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59539}
Junio C Hamano1a4e8412005-12-27 08:17:23540</style>
Junio C Hamano7bd050f2011-09-22 06:32:22541<script type="text/javascript">
542/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22543var asciidoc = { // Namespace.
544
545/////////////////////////////////////////////////////////////////////
546// Table Of Contents generator
547/////////////////////////////////////////////////////////////////////
548
549/* Author: Mihai Bazon, September 2002
550 * http://students.infoiasi.ro/~mishoo
551 *
552 * Table Of Content generator
553 * Version: 0.4
554 *
555 * Feel free to use this script under the terms of the GNU General Public
556 * License, as long as you do not remove or alter this notice.
557 */
558
559 /* modified by Troy D. Hanson, September 2006. License: GPL */
560 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
561
562// toclevels = 1..4.
563toc: function (toclevels) {
564
565 function getText(el) {
566 var text = "";
567 for (var i = el.firstChild; i != null; i = i.nextSibling) {
568 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
569 text += i.data;
570 else if (i.firstChild != null)
571 text += getText(i);
572 }
573 return text;
574 }
575
576 function TocEntry(el, text, toclevel) {
577 this.element = el;
578 this.text = text;
579 this.toclevel = toclevel;
580 }
581
582 function tocEntries(el, toclevels) {
583 var result = new Array;
Junio C Hamano61525f92014-01-17 22:46:49584 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22585 // Function that scans the DOM tree for header elements (the DOM2
586 // nodeIterator API would be a better technique but not supported by all
587 // browsers).
588 var iterate = function (el) {
589 for (var i = el.firstChild; i != null; i = i.nextSibling) {
590 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
591 var mo = re.exec(i.tagName);
592 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
593 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
594 }
595 iterate(i);
596 }
597 }
598 }
599 iterate(el);
600 return result;
601 }
602
603 var toc = document.getElementById("toc");
Junio C Hamano9629d4f2012-12-19 00:28:27604 if (!toc) {
605 return;
606 }
607
608 // Delete existing TOC entries in case we're reloading the TOC.
609 var tocEntriesToRemove = [];
610 var i;
611 for (i = 0; i < toc.childNodes.length; i++) {
612 var entry = toc.childNodes[i];
Junio C Hamano61525f92014-01-17 22:46:49613 if (entry.nodeName == 'div'
Junio C Hamano9629d4f2012-12-19 00:28:27614 && entry.getAttribute("class")
615 && entry.getAttribute("class").match(/^toclevel/))
616 tocEntriesToRemove.push(entry);
617 }
618 for (i = 0; i < tocEntriesToRemove.length; i++) {
619 toc.removeChild(tocEntriesToRemove[i]);
620 }
621
622 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22623 var entries = tocEntries(document.getElementById("content"), toclevels);
624 for (var i = 0; i < entries.length; ++i) {
625 var entry = entries[i];
626 if (entry.element.id == "")
627 entry.element.id = "_toc_" + i;
628 var a = document.createElement("a");
629 a.href = "#" + entry.element.id;
630 a.appendChild(document.createTextNode(entry.text));
631 var div = document.createElement("div");
632 div.appendChild(a);
633 div.className = "toclevel" + entry.toclevel;
634 toc.appendChild(div);
635 }
636 if (entries.length == 0)
637 toc.parentNode.removeChild(toc);
638},
639
640
641/////////////////////////////////////////////////////////////////////
642// Footnotes generator
643/////////////////////////////////////////////////////////////////////
644
645/* Based on footnote generation code from:
646 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
647 */
648
649footnotes: function () {
Junio C Hamano9629d4f2012-12-19 00:28:27650 // Delete existing footnote entries in case we're reloading the footnodes.
651 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22652 var noteholder = document.getElementById("footnotes");
Junio C Hamano9629d4f2012-12-19 00:28:27653 if (!noteholder) {
654 return;
655 }
656 var entriesToRemove = [];
657 for (i = 0; i < noteholder.childNodes.length; i++) {
658 var entry = noteholder.childNodes[i];
Junio C Hamano61525f92014-01-17 22:46:49659 if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9629d4f2012-12-19 00:28:27660 entriesToRemove.push(entry);
661 }
662 for (i = 0; i < entriesToRemove.length; i++) {
663 noteholder.removeChild(entriesToRemove[i]);
664 }
665
666 // Rebuild footnote entries.
667 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22668 var spans = cont.getElementsByTagName("span");
669 var refs = {};
670 var n = 0;
671 for (i=0; i<spans.length; i++) {
672 if (spans[i].className == "footnote") {
673 n++;
Junio C Hamano9629d4f2012-12-19 00:28:27674 var note = spans[i].getAttribute("data-note");
675 if (!note) {
676 // Use [\s\S] in place of . so multi-line matches work.
677 // Because JavaScript has no s (dotall) regex flag.
678 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
679 spans[i].innerHTML =
680 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
681 "' title='View footnote' class='footnote'>" + n + "</a>]";
682 spans[i].setAttribute("data-note", note);
683 }
Junio C Hamano7bd050f2011-09-22 06:32:22684 noteholder.innerHTML +=
685 "<div class='footnote' id='_footnote_" + n + "'>" +
686 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
687 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22688 var id =spans[i].getAttribute("id");
689 if (id != null) refs["#"+id] = n;
690 }
691 }
692 if (n == 0)
693 noteholder.parentNode.removeChild(noteholder);
694 else {
695 // Process footnoterefs.
696 for (i=0; i<spans.length; i++) {
697 if (spans[i].className == "footnoteref") {
698 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
699 href = href.match(/#.*/)[0]; // Because IE return full URL.
700 n = refs[href];
701 spans[i].innerHTML =
702 "[<a href='#_footnote_" + n +
703 "' title='View footnote' class='footnote'>" + n + "</a>]";
704 }
705 }
706 }
Junio C Hamano9629d4f2012-12-19 00:28:27707},
708
709install: function(toclevels) {
710 var timerId;
711
712 function reinstall() {
713 asciidoc.footnotes();
714 if (toclevels) {
715 asciidoc.toc(toclevels);
716 }
717 }
718
719 function reinstallAndRemoveTimer() {
720 clearInterval(timerId);
721 reinstall();
722 }
723
724 timerId = setInterval(reinstall, 500);
725 if (document.addEventListener)
726 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
727 else
728 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22729}
730
731}
Junio C Hamano9629d4f2012-12-19 00:28:27732asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22733/*]]>*/
734</script>
Junio C Hamano1a4e8412005-12-27 08:17:23735</head>
Junio C Hamano9629d4f2012-12-19 00:28:27736<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23737<div id="header">
738<h1>
739git-format-patch(1) Manual Page
740</h1>
741<h2>NAME</h2>
742<div class="sectionbody">
743<p>git-format-patch -
Junio C Hamano01078922006-03-10 00:31:47744 Prepare patches for e-mail submission
Junio C Hamano1a4e8412005-12-27 08:17:23745</p>
746</div>
747</div>
Junio C Hamano7bd050f2011-09-22 06:32:22748<div id="content">
Junio C Hamano9629d4f2012-12-19 00:28:27749<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59750<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23751<div class="sectionbody">
Junio C Hamano235a91e2006-01-07 01:13:58752<div class="verseblock">
Junio C Hamano9629d4f2012-12-19 00:28:27753<pre class="content"><em>git format-patch</em> [-k] [(-o|--output-directory) &lt;dir&gt; | --stdout]
Junio C Hamano1bbd0f42009-07-23 06:20:29754 [--no-thread | --thread[=&lt;style&gt;]]
Junio C Hamanof4581102009-04-25 08:29:59755 [(--attach|--inline)[=&lt;boundary&gt;] | --no-attach]
756 [-s | --signoff]
Junio C Hamano89a57342010-06-22 23:22:55757 [--signature=&lt;signature&gt; | --no-signature]
Junio C Hamano8c5802d2007-11-15 00:13:36758 [-n | --numbered | -N | --no-numbered]
Junio C Hamano94cad1a2007-06-06 10:48:25759 [--start-number &lt;n&gt;] [--numbered-files]
Junio C Hamano4f9a6052007-01-17 20:25:16760 [--in-reply-to=Message-Id] [--suffix=.&lt;sfx&gt;]
Junio C Hamano7c73c662007-01-19 00:37:50761 [--ignore-if-in-upstream]
Junio C Hamano7dac6902013-01-12 08:25:31762 [--subject-prefix=Subject-Prefix] [(--reroll-count|-v) &lt;n&gt;]
Junio C Hamanoea90ab32010-03-15 20:32:55763 [--to=&lt;email&gt;] [--cc=&lt;email&gt;]
Junio C Hamanoea3b7522013-04-18 19:37:53764 [--[no-]cover-letter] [--quiet] [--notes[=&lt;ref&gt;]]
Junio C Hamanof4581102009-04-25 08:29:59765 [&lt;common diff options&gt;]
Junio C Hamano9629d4f2012-12-19 00:28:27766 [ &lt;since&gt; | &lt;revision range&gt; ]</pre>
767<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59768</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23769</div>
Junio C Hamano9629d4f2012-12-19 00:28:27770</div>
771<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31772<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23773<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59774<div class="paragraph"><p>Prepare each commit with its patch in
Junio C Hamano341071d2006-06-04 07:24:48775one file per commit, formatted to resemble UNIX mailbox format.
Junio C Hamano7d9e9bd2007-08-29 07:31:47776The output of this command is convenient for e-mail submission or
Junio C Hamano1aa40d22010-01-21 17:46:43777for use with <em>git am</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59778<div class="paragraph"><p>There are two ways to specify which commits to operate on.</p></div>
779<div class="olist arabic"><ol class="arabic">
Junio C Hamano7d9e9bd2007-08-29 07:31:47780<li>
781<p>
782A single commit, &lt;since&gt;, specifies that the commits leading
783 to the tip of the current branch that are not in the history
784 that leads to the &lt;since&gt; to be output.
785</p>
786</li>
787<li>
788<p>
789Generic &lt;revision range&gt; expression (see "SPECIFYING
Junio C Hamanoa28a9202012-06-21 07:08:23790 REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>) means the
Junio C Hamano7d9e9bd2007-08-29 07:31:47791 commits in the specified range.
792</p>
793</li>
Junio C Hamanoba4b9282008-07-06 05:20:31794</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:59795<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:03796apply the second rule, i.e., format everything since the beginning of
Junio C Hamano61525f92014-01-17 22:46:49797history up until &lt;commit&gt;, use the <em>--root</em> option: <tt>git format-patch
798--root &lt;commit&gt;</tt>. If you want to format only &lt;commit&gt; itself, you
799can do this with <tt>git format-patch -1 &lt;commit&gt;</tt>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59800<div class="paragraph"><p>By default, each output file is numbered sequentially from 1, and uses the
Junio C Hamano341071d2006-06-04 07:24:48801first line of the commit message (massaged for pathname safety) as
Junio C Hamano61525f92014-01-17 22:46:49802the filename. With the <tt>--numbered-files</tt> option, the output file names
Junio C Hamano94cad1a2007-06-06 10:48:25803will only be numbers, without the first line of the commit appended.
804The names of the output files are printed to standard
Junio C Hamano61525f92014-01-17 22:46:49805output, unless the <tt>--stdout</tt> option is specified.</p></div>
806<div class="paragraph"><p>If <tt>-o</tt> is specified, output files are created in &lt;dir&gt;. Otherwise
Junio C Hamanoba4b9282008-07-06 05:20:31807they are created in the current working directory.</p></div>
Junio C Hamano281fd392012-09-17 23:57:41808<div class="paragraph"><p>By default, the subject of a single patch is "[PATCH] " followed by
809the concatenation of lines from the commit message up to the first blank
810line (see the DISCUSSION section of <a href="git-commit.html">git-commit(1)</a>).</p></div>
811<div class="paragraph"><p>When multiple patches are output, the subject prefix will instead be
Junio C Hamano61525f92014-01-17 22:46:49812"[PATCH n/m] ". To force 1/1 to be added for a single patch, use <tt>-n</tt>.
813To omit patch numbers from the subject, use <tt>-N</tt>.</p></div>
814<div class="paragraph"><p>If given <tt>--thread</tt>, <tt>git-format-patch</tt> will generate <tt>In-Reply-To</tt> and
815<tt>References</tt> headers to make the second and subsequent patch mails appear
816as replies to the first mail; this also generates a <tt>Message-Id</tt> header to
Junio C Hamanoba4b9282008-07-06 05:20:31817reference.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23818</div>
Junio C Hamano9629d4f2012-12-19 00:28:27819</div>
820<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31821<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23822<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59823<div class="dlist"><dl>
824<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:26825-p
826</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59827<dt class="hdlist1">
Junio C Hamano3b70d3c2009-11-21 17:37:37828--no-stat
829</dt>
Junio C Hamano60f8aa82007-03-06 09:58:26830<dd>
831<p>
Junio C Hamano3b70d3c2009-11-21 17:37:37832 Generate plain patches without any diffstats.
Junio C Hamano60f8aa82007-03-06 09:58:26833</p>
834</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59835<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:59836-s
837</dt>
838<dt class="hdlist1">
839--no-patch
840</dt>
841<dd>
842<p>
Junio C Hamano61525f92014-01-17 22:46:49843 Suppress diff output. Useful for commands like <tt>git show</tt> that
844 show the patch by default, or to cancel the effect of <tt>--patch</tt>.
Junio C Hamano58f587a2013-07-22 19:20:59845</p>
846</dd>
847<dt class="hdlist1">
Junio C Hamano69361562007-07-26 02:14:34848-U&lt;n&gt;
849</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59850<dt class="hdlist1">
Junio C Hamano69361562007-07-26 02:14:34851--unified=&lt;n&gt;
852</dt>
853<dd>
854<p>
855 Generate diffs with &lt;n&gt; lines of context instead of
Junio C Hamano3b70d3c2009-11-21 17:37:37856 the usual three.
Junio C Hamano60f8aa82007-03-06 09:58:26857</p>
858</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59859<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:34860--minimal
861</dt>
862<dd>
863<p>
864 Spend extra time to make sure the smallest possible
865 diff is produced.
866</p>
867</dd>
868<dt class="hdlist1">
Junio C Hamano20d47e32009-01-26 06:36:02869--patience
870</dt>
871<dd>
872<p>
873 Generate a diff using the "patience diff" algorithm.
874</p>
875</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59876<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:11877--histogram
878</dt>
879<dd>
880<p>
881 Generate a diff using the "histogram diff" algorithm.
882</p>
883</dd>
884<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:03885--diff-algorithm={patience|minimal|histogram|myers}
886</dt>
887<dd>
888<p>
889 Choose a diff algorithm. The variants are as follows:
890</p>
891<div class="openblock">
892<div class="content">
893<div class="dlist"><dl>
894<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:49895<tt>default</tt>, <tt>myers</tt>
Junio C Hamano80ad00d2013-02-18 00:19:03896</dt>
897<dd>
898<p>
899 The basic greedy diff algorithm. Currently, this is the default.
900</p>
901</dd>
902<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:49903<tt>minimal</tt>
Junio C Hamano80ad00d2013-02-18 00:19:03904</dt>
905<dd>
906<p>
907 Spend extra time to make sure the smallest possible diff is
908 produced.
909</p>
910</dd>
911<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:49912<tt>patience</tt>
Junio C Hamano80ad00d2013-02-18 00:19:03913</dt>
914<dd>
915<p>
916 Use "patience diff" algorithm when generating patches.
917</p>
918</dd>
919<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:49920<tt>histogram</tt>
Junio C Hamano80ad00d2013-02-18 00:19:03921</dt>
922<dd>
923<p>
924 This algorithm extends the patience algorithm to "support
925 low-occurrence common elements".
926</p>
927</dd>
928</dl></div>
929</div></div>
930<div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a
931non-default value and want to use the default one, then you
Junio C Hamano61525f92014-01-17 22:46:49932have to use <tt>--diff-algorithm=default</tt> option.</p></div>
Junio C Hamano80ad00d2013-02-18 00:19:03933</dd>
934<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:32935--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamano60f8aa82007-03-06 09:58:26936</dt>
937<dd>
938<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:11939 Generate a diffstat. By default, as much space as necessary
940 will be used for the filename part, and the rest for the graph
941 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:39942 if not connected to a terminal, and can be overridden by
Junio C Hamano61525f92014-01-17 22:46:49943 <tt>&lt;width&gt;</tt>. The width of the filename part can be limited by
944 giving another width <tt>&lt;name-width&gt;</tt> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:11945 of the graph part can be limited by using
Junio C Hamano61525f92014-01-17 22:46:49946 <tt>--stat-graph-width=&lt;width&gt;</tt> (affects all commands generating
947 a stat graph) or by setting <tt>diff.statGraphWidth=&lt;width&gt;</tt>
948 (does not affect <tt>git format-patch</tt>).
949 By giving a third parameter <tt>&lt;count&gt;</tt>, you can limit the
950 output to the first <tt>&lt;count&gt;</tt> lines, followed by <tt>...</tt> if
Junio C Hamanoaea9e6b2012-03-07 00:17:11951 there are more.
Junio C Hamano60f8aa82007-03-06 09:58:26952</p>
Junio C Hamano61525f92014-01-17 22:46:49953<div class="paragraph"><p>These parameters can also be set individually with <tt>--stat-width=&lt;width&gt;</tt>,
954<tt>--stat-name-width=&lt;name-width&gt;</tt> and <tt>--stat-count=&lt;count&gt;</tt>.</p></div>
Junio C Hamano60f8aa82007-03-06 09:58:26955</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59956<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:26957--numstat
958</dt>
959<dd>
960<p>
Junio C Hamano61525f92014-01-17 22:46:49961 Similar to <tt>--stat</tt>, but shows number of added and
Junio C Hamano60f8aa82007-03-06 09:58:26962 deleted lines in decimal notation and pathname without
963 abbreviation, to make it more machine friendly. For
Junio C Hamano61525f92014-01-17 22:46:49964 binary files, outputs two <tt>-</tt> instead of saying
965 <tt>0 0</tt>.
Junio C Hamano60f8aa82007-03-06 09:58:26966</p>
967</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59968<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:26969--shortstat
970</dt>
971<dd>
972<p>
Junio C Hamano61525f92014-01-17 22:46:49973 Output only the last line of the <tt>--stat</tt> format containing total
Junio C Hamano60f8aa82007-03-06 09:58:26974 number of modified files, as well as number of added and deleted
975 lines.
976</p>
977</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59978<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:32979--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamano6a45be92008-04-22 08:19:03980</dt>
981<dd>
982<p>
Junio C Hamano1c222c52011-05-13 19:55:32983 Output the distribution of relative amount of changes for each
Junio C Hamano61525f92014-01-17 22:46:49984 sub-directory. The behavior of <tt>--dirstat</tt> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:32985 passing it a comma separated list of parameters.
Junio C Hamano61525f92014-01-17 22:46:49986 The defaults are controlled by the <tt>diff.dirstat</tt> configuration
Junio C Hamanoa28a9202012-06-21 07:08:23987 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:32988 The following parameters are available:
Junio C Hamano6a45be92008-04-22 08:19:03989</p>
Junio C Hamano9629d4f2012-12-19 00:28:27990<div class="openblock">
991<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:32992<div class="dlist"><dl>
993<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:49994<tt>changes</tt>
Junio C Hamano1c222c52011-05-13 19:55:32995</dt>
996<dd>
997<p>
998 Compute the dirstat numbers by counting the lines that have been
999 removed from the source, or added to the destination. This ignores
1000 the amount of pure code movements within a file. In other words,
1001 rearranging lines in a file is not counted as much as other changes.
1002 This is the default behavior when no parameter is given.
1003</p>
Junio C Hamano6a45be92008-04-22 08:19:031004</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591005<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:491006<tt>lines</tt>
Junio C Hamanoa476efa2008-10-10 15:31:421007</dt>
1008<dd>
1009<p>
Junio C Hamano1c222c52011-05-13 19:55:321010 Compute the dirstat numbers by doing the regular line-based diff
1011 analysis, and summing the removed/added line counts. (For binary
1012 files, count 64-byte chunks instead, since binary files have no
Junio C Hamano61525f92014-01-17 22:46:491013 natural concept of lines). This is a more expensive <tt>--dirstat</tt>
1014 behavior than the <tt>changes</tt> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:321015 lines within a file as much as other changes. The resulting output
Junio C Hamano61525f92014-01-17 22:46:491016 is consistent with what you get from the other <tt>--*stat</tt> options.
Junio C Hamanoa476efa2008-10-10 15:31:421017</p>
1018</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591019<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:491020<tt>files</tt>
Junio C Hamano1c222c52011-05-13 19:55:321021</dt>
1022<dd>
1023<p>
1024 Compute the dirstat numbers by counting the number of files changed.
1025 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamano61525f92014-01-17 22:46:491026 the computationally cheapest <tt>--dirstat</tt> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:321027 not have to look at the file contents at all.
1028</p>
1029</dd>
1030<dt class="hdlist1">
Junio C Hamano61525f92014-01-17 22:46:491031<tt>cumulative</tt>
Junio C Hamano1c222c52011-05-13 19:55:321032</dt>
1033<dd>
1034<p>
1035 Count changes in a child directory for the parent directory as well.
Junio C Hamano61525f92014-01-17 22:46:491036 Note that when using <tt>cumulative</tt>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:321037 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamano61525f92014-01-17 22:46:491038 be specified with the <tt>noncumulative</tt> parameter.
Junio C Hamano1c222c52011-05-13 19:55:321039</p>
1040</dd>
1041<dt class="hdlist1">
1042&lt;limit&gt;
1043</dt>
1044<dd>
1045<p>
1046 An integer parameter specifies a cut-off percent (3% by default).
1047 Directories contributing less than this percentage of the changes
1048 are not shown in the output.
1049</p>
1050</dd>
1051</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271052</div></div>
Junio C Hamano1c222c52011-05-13 19:55:321053<div class="paragraph"><p>Example: The following will count changed files, while ignoring
1054directories with less than 10% of the total amount of changed files,
1055and accumulating child directory counts in the parent directories:
Junio C Hamano61525f92014-01-17 22:46:491056<tt>--dirstat=files,10,cumulative</tt>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:321057</dd>
1058<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261059--summary
1060</dt>
1061<dd>
1062<p>
1063 Output a condensed summary of extended header information
1064 such as creations, renames and mode changes.
1065</p>
1066</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591067<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261068--no-renames
1069</dt>
1070<dd>
1071<p>
1072 Turn off rename detection, even when the configuration
1073 file gives the default to do so.
1074</p>
1075</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591076<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261077--full-index
1078</dt>
1079<dd>
1080<p>
Junio C Hamano5cf43ca2008-08-20 09:14:141081 Instead of the first handful of characters, show the full
1082 pre- and post-image blob object names on the "index"
1083 line when generating patch format output.
Junio C Hamano60f8aa82007-03-06 09:58:261084</p>
1085</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591086<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261087--binary
1088</dt>
1089<dd>
1090<p>
Junio C Hamano61525f92014-01-17 22:46:491091 In addition to <tt>--full-index</tt>, output a binary diff that
1092 can be applied with <tt>git-apply</tt>.
Junio C Hamano60f8aa82007-03-06 09:58:261093</p>
1094</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591095<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261096--abbrev[=&lt;n&gt;]
1097</dt>
1098<dd>
1099<p>
1100 Instead of showing the full 40-byte hexadecimal object
1101 name in diff-raw format output and diff-tree header
Junio C Hamano6efe3022009-01-13 16:47:561102 lines, show only a partial prefix. This is
Junio C Hamano61525f92014-01-17 22:46:491103 independent of the <tt>--full-index</tt> option above, which controls
Junio C Hamano60f8aa82007-03-06 09:58:261104 the diff-patch output format. Non default number of
Junio C Hamano61525f92014-01-17 22:46:491105 digits can be specified with <tt>--abbrev=&lt;n&gt;</tt>.
Junio C Hamano60f8aa82007-03-06 09:58:261106</p>
1107</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591108<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141109-B[&lt;n&gt;][/&lt;m&gt;]
Junio C Hamano60f8aa82007-03-06 09:58:261110</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591111<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541112--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
1113</dt>
Junio C Hamano60f8aa82007-03-06 09:58:261114<dd>
1115<p>
Junio C Hamanoe85e36f2010-08-10 05:30:141116 Break complete rewrite changes into pairs of delete and
1117 create. This serves two purposes:
Junio C Hamano60f8aa82007-03-06 09:58:261118</p>
Junio C Hamano68cf15a2010-11-06 01:01:591119<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:141120not as a series of deletion and insertion mixed together with a very
1121few lines that happen to match textually as the context, but as a
1122single deletion of everything old followed by a single insertion of
Junio C Hamano61525f92014-01-17 22:46:491123everything new, and the number <tt>m</tt> controls this aspect of the -B
1124option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:211125original should remain in the result for Git to consider it a total
Junio C Hamanoe85e36f2010-08-10 05:30:141126rewrite (i.e. otherwise the resulting patch will be a series of
1127deletion and insertion mixed together with context lines).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591128<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
Junio C Hamanoe85e36f2010-08-10 05:30:141129source of a rename (usually -M only considers a file that disappeared
Junio C Hamano61525f92014-01-17 22:46:491130as the source of a rename), and the number <tt>n</tt> controls this aspect of
1131the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with
Junio C Hamano68cf15a2010-11-06 01:01:591132addition and deletion compared to 20% or more of the file&#8217;s size are
Junio C Hamanoe85e36f2010-08-10 05:30:141133eligible for being picked up as a possible source of a rename to
1134another file.</p></div>
Junio C Hamano60f8aa82007-03-06 09:58:261135</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591136<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141137-M[&lt;n&gt;]
Junio C Hamano60f8aa82007-03-06 09:58:261138</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591139<dt class="hdlist1">
Junio C Hamano0d75e872010-12-17 06:57:261140--find-renames[=&lt;n&gt;]
Junio C Hamano39c7a692010-10-27 06:08:541141</dt>
Junio C Hamano60f8aa82007-03-06 09:58:261142<dd>
1143<p>
1144 Detect renames.
Junio C Hamano61525f92014-01-17 22:46:491145 If <tt>n</tt> is specified, it is a threshold on the similarity
Junio C Hamanoe85e36f2010-08-10 05:30:141146 index (i.e. amount of addition/deletions compared to the
Junio C Hamano61525f92014-01-17 22:46:491147 file&#8217;s size). For example, <tt>-M90%</tt> means Git should consider a
Junio C Hamanoe85e36f2010-08-10 05:30:141148 delete/add pair to be a rename if more than 90% of the file
Junio C Hamano61525f92014-01-17 22:46:491149 hasn&#8217;t changed. Without a <tt>%</tt> sign, the number is to be read as
1150 a fraction, with a decimal point before it. I.e., <tt>-M5</tt> becomes
1151 0.5, and is thus the same as <tt>-M50%</tt>. Similarly, <tt>-M05</tt> is
1152 the same as <tt>-M5%</tt>. To limit detection to exact renames, use
1153 <tt>-M100%</tt>. The default similarity index is 50%.
Junio C Hamano60f8aa82007-03-06 09:58:261154</p>
1155</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591156<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141157-C[&lt;n&gt;]
Junio C Hamano60f8aa82007-03-06 09:58:261158</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591159<dt class="hdlist1">
Junio C Hamano0d75e872010-12-17 06:57:261160--find-copies[=&lt;n&gt;]
Junio C Hamano39c7a692010-10-27 06:08:541161</dt>
Junio C Hamano60f8aa82007-03-06 09:58:261162<dd>
1163<p>
Junio C Hamano61525f92014-01-17 22:46:491164 Detect copies as well as renames. See also <tt>--find-copies-harder</tt>.
1165 If <tt>n</tt> is specified, it has the same meaning as for <tt>-M&lt;n&gt;</tt>.
Junio C Hamano60f8aa82007-03-06 09:58:261166</p>
1167</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591168<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261169--find-copies-harder
1170</dt>
1171<dd>
1172<p>
Junio C Hamano61525f92014-01-17 22:46:491173 For performance reasons, by default, <tt>-C</tt> option finds copies only
Junio C Hamano60f8aa82007-03-06 09:58:261174 if the original file of the copy was modified in the same
1175 changeset. This flag makes the command
1176 inspect unmodified files as candidates for the source of
1177 copy. This is a very expensive operation for large
Junio C Hamano16f98872007-06-12 16:09:141178 projects, so use it with caution. Giving more than one
Junio C Hamano61525f92014-01-17 22:46:491179 <tt>-C</tt> option has the same effect.
Junio C Hamano60f8aa82007-03-06 09:58:261180</p>
1181</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591182<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:021183-D
1184</dt>
1185<dt class="hdlist1">
1186--irreversible-delete
1187</dt>
1188<dd>
1189<p>
1190 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamano61525f92014-01-17 22:46:491191 the diff between the preimage and <tt>/dev/null</tt>. The resulting patch
Junio C Hamanod75148a2014-04-08 19:48:381192 is not meant to be applied with <tt>patch</tt> or <tt>git apply</tt>; this is
Junio C Hamanob02377c2011-04-28 22:26:021193 solely for people who want to just concentrate on reviewing the
1194 text after the change. In addition, the output obviously lack
1195 enough information to apply such a patch in reverse, even manually,
1196 hence the name of the option.
1197</p>
Junio C Hamano61525f92014-01-17 22:46:491198<div class="paragraph"><p>When used together with <tt>-B</tt>, omit also the preimage in the deletion part
Junio C Hamanob02377c2011-04-28 22:26:021199of a delete/create pair.</p></div>
1200</dd>
1201<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261202-l&lt;num&gt;
1203</dt>
1204<dd>
1205<p>
Junio C Hamano61525f92014-01-17 22:46:491206 The <tt>-M</tt> and <tt>-C</tt> options require O(n^2) processing time where n
Junio C Hamano60f8aa82007-03-06 09:58:261207 is the number of potential rename/copy targets. This
1208 option prevents rename/copy detection from running if
1209 the number of rename/copy targets exceeds the specified
1210 number.
1211</p>
1212</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591213<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261214-O&lt;orderfile&gt;
1215</dt>
1216<dd>
1217<p>
1218 Output the patch in the order specified in the
1219 &lt;orderfile&gt;, which has one shell glob pattern per line.
Junio C Hamano61525f92014-01-17 22:46:491220 This overrides the <tt>diff.orderfile</tt> configuration variable
1221 (see <a href="git-config.html">git-config(1)</a>). To cancel <tt>diff.orderfile</tt>,
1222 use <tt>-O/dev/null</tt>.
Junio C 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-a
1227</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591228<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261229--text
1230</dt>
1231<dd>
1232<p>
1233 Treat all files as text.
1234</p>
1235</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591236<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261237--ignore-space-at-eol
1238</dt>
1239<dd>
1240<p>
Junio C Hamano3a702342007-12-12 21:34:021241 Ignore changes in whitespace at EOL.
Junio C Hamano60f8aa82007-03-06 09:58:261242</p>
1243</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591244<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221245-b
1246</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591247<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261248--ignore-space-change
1249</dt>
1250<dd>
1251<p>
Junio C Hamano3a702342007-12-12 21:34:021252 Ignore changes in amount of whitespace. This ignores whitespace
1253 at line end, and considers all other sequences of one or
1254 more whitespace characters to be equivalent.
Junio C Hamano60f8aa82007-03-06 09:58:261255</p>
1256</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591257<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221258-w
Junio C Hamano60f8aa82007-03-06 09:58:261259</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591260<dt class="hdlist1">
Junio C Hamano60f8aa82007-03-06 09:58:261261--ignore-all-space
1262</dt>
1263<dd>
1264<p>
Junio C Hamano3a702342007-12-12 21:34:021265 Ignore whitespace when comparing lines. This ignores
1266 differences even if one line has whitespace where the other
Junio C Hamano60f8aa82007-03-06 09:58:261267 line has none.
1268</p>
1269</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591270<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:181271--ignore-blank-lines
1272</dt>
1273<dd>
1274<p>
1275 Ignore changes whose lines are all blank.
1276</p>
1277</dd>
1278<dt class="hdlist1">
Junio C Hamano1d40ee82009-01-07 10:14:161279--inter-hunk-context=&lt;lines&gt;
1280</dt>
1281<dd>
1282<p>
1283 Show the context between diff hunks, up to the specified number
1284 of lines, thereby fusing hunks that are close to each other.
1285</p>
1286</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591287<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:091288-W
1289</dt>
1290<dt class="hdlist1">
1291--function-context
1292</dt>
1293<dd>
1294<p>
1295 Show whole surrounding functions of changes.
1296</p>
1297</dd>
1298<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401299--ext-diff
1300</dt>
1301<dd>
1302<p>
1303 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:231304 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
1305 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanobb0f4042007-07-04 06:41:401306</p>
1307</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591308<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401309--no-ext-diff
1310</dt>
1311<dd>
1312<p>
1313 Disallow external diff drivers.
1314</p>
1315</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591316<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:311317--textconv
1318</dt>
1319<dt class="hdlist1">
1320--no-textconv
1321</dt>
1322<dd>
1323<p>
1324 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:231325 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:311326 details. Because textconv filters are typically a one-way
1327 conversion, the resulting diff is suitable for human
1328 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:231329 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
1330 <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or
Junio C Hamanoc652aed2011-07-07 01:14:311331 diff plumbing commands.
1332</p>
1333</dd>
1334<dt class="hdlist1">
Junio C Hamano7d449522010-07-01 00:08:511335--ignore-submodules[=&lt;when&gt;]
Junio C Hamanodfccbb02008-05-26 01:16:141336</dt>
1337<dd>
1338<p>
Junio C Hamano7d449522010-07-01 00:08:511339 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamanoc7102962013-05-29 23:57:171340 either "none", "untracked", "dirty" or "all", which is the default.
Junio C Hamano619596a2010-08-18 22:15:351341 Using "none" will consider the submodule modified when it either contains
1342 untracked or modified files or its HEAD differs from the commit recorded
1343 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:231344 <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:511345 "untracked" is used submodules are not considered dirty when they only
1346 contain untracked content (but they are still scanned for modified
1347 content). Using "dirty" ignores all changes to the work tree of submodules,
1348 only changes to the commits stored in the superproject are shown (this was
1349 the behavior until 1.7.0). Using "all" hides all changes to submodules.
Junio C Hamanodfccbb02008-05-26 01:16:141350</p>
1351</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591352<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331353--src-prefix=&lt;prefix&gt;
1354</dt>
1355<dd>
1356<p>
1357 Show the given source prefix instead of "a/".
1358</p>
1359</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591360<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331361--dst-prefix=&lt;prefix&gt;
1362</dt>
1363<dd>
1364<p>
1365 Show the given destination prefix instead of "b/".
1366</p>
1367</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591368<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331369--no-prefix
1370</dt>
1371<dd>
1372<p>
1373 Do not show any source or destination prefix.
1374</p>
1375</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311376</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591377<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:231378<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591379<div class="dlist"><dl>
1380<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401381-&lt;n&gt;
1382</dt>
1383<dd>
1384<p>
Junio C Hamano3b4609d2010-09-30 00:04:341385 Prepare patches from the topmost &lt;n&gt; commits.
Junio C Hamanobb0f4042007-07-04 06:41:401386</p>
1387</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591388<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471389-o &lt;dir&gt;
1390</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591391<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471392--output-directory &lt;dir&gt;
Junio C Hamano1a4e8412005-12-27 08:17:231393</dt>
1394<dd>
1395<p>
1396 Use &lt;dir&gt; to store the resulting files, instead of the
Junio C Hamano1bab4b02006-06-06 21:58:331397 current working directory.
Junio C Hamano1a4e8412005-12-27 08:17:231398</p>
1399</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591400<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471401-n
1402</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591403<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471404--numbered
Junio C Hamano1a4e8412005-12-27 08:17:231405</dt>
1406<dd>
1407<p>
Junio C Hamano7d06a8a2008-10-20 05:42:331408 Name output in <em>[PATCH n/m]</em> format, even with a single patch.
Junio C Hamano1a4e8412005-12-27 08:17:231409</p>
1410</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591411<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471412-N
1413</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591414<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471415--no-numbered
Junio C Hamano8c5802d2007-11-15 00:13:361416</dt>
1417<dd>
1418<p>
1419 Name output in <em>[PATCH]</em> format.
1420</p>
1421</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591422<dt class="hdlist1">
Junio C Hamano341071d2006-06-04 07:24:481423--start-number &lt;n&gt;
1424</dt>
1425<dd>
1426<p>
1427 Start numbering the patches at &lt;n&gt; instead of 1.
1428</p>
1429</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591430<dt class="hdlist1">
Junio C Hamano94cad1a2007-06-06 10:48:251431--numbered-files
1432</dt>
1433<dd>
1434<p>
1435 Output file names will be a simple number sequence
1436 without the default first line of the commit appended.
Junio C Hamano94cad1a2007-06-06 10:48:251437</p>
1438</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591439<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471440-k
1441</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591442<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471443--keep-subject
Junio C Hamano1a4e8412005-12-27 08:17:231444</dt>
1445<dd>
1446<p>
1447 Do not strip/add <em>[PATCH]</em> from the first line of the
1448 commit log message.
1449</p>
1450</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591451<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471452-s
1453</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591454<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471455--signoff
Junio C Hamano1a4e8412005-12-27 08:17:231456</dt>
1457<dd>
1458<p>
Junio C Hamano61525f92014-01-17 22:46:491459 Add <tt>Signed-off-by:</tt> line to the commit message, using
Junio C Hamano1a4e8412005-12-27 08:17:231460 the committer identity of yourself.
1461</p>
1462</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591463<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231464--stdout
1465</dt>
1466<dd>
1467<p>
Junio C Hamano341071d2006-06-04 07:24:481468 Print all commits to the standard output in mbox format,
1469 instead of creating a file for each one.
Junio C Hamano1a4e8412005-12-27 08:17:231470</p>
1471</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591472<dt class="hdlist1">
Junio C Hamanoc51fede2007-03-12 07:29:201473--attach[=&lt;boundary&gt;]
Junio C Hamano2496ae42006-03-11 08:04:331474</dt>
1475<dd>
1476<p>
Junio C Hamanoc51fede2007-03-12 07:29:201477 Create multipart/mixed attachment, the first part of
1478 which is the commit message and the patch itself in the
Junio C Hamano61525f92014-01-17 22:46:491479 second part, with <tt>Content-Disposition: attachment</tt>.
Junio C Hamanoc51fede2007-03-12 07:29:201480</p>
1481</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591482<dt class="hdlist1">
Junio C Hamano0a235222009-03-06 08:21:091483--no-attach
1484</dt>
1485<dd>
1486<p>
1487 Disable the creation of an attachment, overriding the
1488 configuration setting.
1489</p>
1490</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591491<dt class="hdlist1">
Junio C Hamanoc51fede2007-03-12 07:29:201492--inline[=&lt;boundary&gt;]
1493</dt>
1494<dd>
1495<p>
1496 Create multipart/mixed attachment, the first part of
1497 which is the commit message and the patch itself in the
Junio C Hamano61525f92014-01-17 22:46:491498 second part, with <tt>Content-Disposition: inline</tt>.
Junio C Hamano2496ae42006-03-11 08:04:331499</p>
1500</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591501<dt class="hdlist1">
Junio C Hamanoea6a7642009-03-11 23:56:191502--thread[=&lt;style&gt;]
Junio C Hamanof9ca97d2006-07-25 22:23:091503</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591504<dt class="hdlist1">
Junio C Hamano1bbd0f42009-07-23 06:20:291505--no-thread
1506</dt>
Junio C Hamanof9ca97d2006-07-25 22:23:091507<dd>
1508<p>
Junio C Hamano61525f92014-01-17 22:46:491509 Controls addition of <tt>In-Reply-To</tt> and <tt>References</tt> headers to
Junio C Hamano1bbd0f42009-07-23 06:20:291510 make the second and subsequent mails appear as replies to the
Junio C Hamano61525f92014-01-17 22:46:491511 first. Also controls generation of the <tt>Message-Id</tt> header to
Junio C Hamano1bbd0f42009-07-23 06:20:291512 reference.
Junio C Hamanof9ca97d2006-07-25 22:23:091513</p>
Junio C Hamano61525f92014-01-17 22:46:491514<div class="paragraph"><p>The optional &lt;style&gt; argument can be either <tt>shallow</tt> or <tt>deep</tt>.
Junio C Hamanof4581102009-04-25 08:29:591515<em>shallow</em> threading makes every mail a reply to the head of the
Junio C Hamanoea6a7642009-03-11 23:56:191516series, where the head is chosen from the cover letter, the
Junio C Hamano61525f92014-01-17 22:46:491517<tt>--in-reply-to</tt>, and the first patch mail, in this order. <em>deep</em>
Junio C Hamano1bbd0f42009-07-23 06:20:291518threading makes every mail a reply to the previous one.</p></div>
Junio C Hamano61525f92014-01-17 22:46:491519<div class="paragraph"><p>The default is <tt>--no-thread</tt>, unless the <em>format.thread</em> configuration
1520is set. If <tt>--thread</tt> is specified without a style, it defaults to the
1521style specified by <em>format.thread</em> if any, or else <tt>shallow</tt>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591522<div class="paragraph"><p>Beware that the default for <em>git send-email</em> is to thread emails
Junio C Hamano61525f92014-01-17 22:46:491523itself. If you want <tt>git format-patch</tt> to take care of threading, you
1524will want to ensure that threading is disabled for <tt>git send-email</tt>.</p></div>
Junio C Hamanof9ca97d2006-07-25 22:23:091525</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591526<dt class="hdlist1">
Junio C Hamanof9ca97d2006-07-25 22:23:091527--in-reply-to=Message-Id
1528</dt>
1529<dd>
1530<p>
Junio C Hamano61525f92014-01-17 22:46:491531 Make the first mail (or all the mails with <tt>--no-thread</tt>) appear as a
Junio C Hamanof9ca97d2006-07-25 22:23:091532 reply to the given Message-Id, which avoids breaking threads to
1533 provide a new patch series.
1534</p>
1535</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591536<dt class="hdlist1">
Junio C Hamano7c73c662007-01-19 00:37:501537--ignore-if-in-upstream
1538</dt>
1539<dd>
1540<p>
1541 Do not include a patch that matches a commit in
1542 &lt;until&gt;..&lt;since&gt;. This will examine all patches reachable
1543 from &lt;since&gt; but not from &lt;until&gt; and compare them with the
1544 patches being generated, and any patch that matches is
1545 ignored.
1546</p>
1547</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591548<dt class="hdlist1">
Junio C Hamano6f1cca82007-04-12 05:02:471549--subject-prefix=&lt;Subject-Prefix&gt;
1550</dt>
1551<dd>
1552<p>
1553 Instead of the standard <em>[PATCH]</em> prefix in the subject
1554 line, instead use <em>[&lt;Subject-Prefix&gt;]</em>. This
1555 allows for useful naming of a patch series, and can be
Junio C Hamano61525f92014-01-17 22:46:491556 combined with the <tt>--numbered</tt> option.
Junio C Hamano6f1cca82007-04-12 05:02:471557</p>
1558</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591559<dt class="hdlist1">
Junio C Hamano7dac6902013-01-12 08:25:311560-v &lt;n&gt;
1561</dt>
1562<dt class="hdlist1">
1563--reroll-count=&lt;n&gt;
1564</dt>
1565<dd>
1566<p>
1567 Mark the series as the &lt;n&gt;-th iteration of the topic. The
Junio C Hamano61525f92014-01-17 22:46:491568 output filenames have <tt>v&lt;n&gt;</tt> pretended to them, and the
Junio C Hamano7dac6902013-01-12 08:25:311569 subject prefix ("PATCH" by default, but configurable via the
Junio C Hamano61525f92014-01-17 22:46:491570 <tt>--subject-prefix</tt> option) has ` v&lt;n&gt;` appended to it. E.g.
1571 <tt>--reroll-count=4</tt> may produce <tt>v4-0001-add-makefile.patch</tt>
Junio C Hamano7dac6902013-01-12 08:25:311572 file that has "Subject: [PATCH v4 1/20] Add makefile" in it.
1573</p>
1574</dd>
1575<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:551576--to=&lt;email&gt;
1577</dt>
1578<dd>
1579<p>
Junio C Hamano61525f92014-01-17 22:46:491580 Add a <tt>To:</tt> header to the email headers. This is in addition
Junio C Hamanoea90ab32010-03-15 20:32:551581 to any configured headers, and may be used multiple times.
Junio C Hamano61525f92014-01-17 22:46:491582 The negated form <tt>--no-to</tt> discards all <tt>To:</tt> headers added so
Junio C Hamano7bd050f2011-09-22 06:32:221583 far (from config or command line).
Junio C Hamanoea90ab32010-03-15 20:32:551584</p>
1585</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591586<dt class="hdlist1">
Junio C Hamano24bc09a2008-02-28 00:27:441587--cc=&lt;email&gt;
1588</dt>
1589<dd>
1590<p>
Junio C Hamano61525f92014-01-17 22:46:491591 Add a <tt>Cc:</tt> header to the email headers. This is in addition
Junio C Hamano24bc09a2008-02-28 00:27:441592 to any configured headers, and may be used multiple times.
Junio C Hamano61525f92014-01-17 22:46:491593 The negated form <tt>--no-cc</tt> discards all <tt>Cc:</tt> headers added so
Junio C Hamano7bd050f2011-09-22 06:32:221594 far (from config or command line).
Junio C Hamano24bc09a2008-02-28 00:27:441595</p>
1596</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591597<dt class="hdlist1">
Junio C Hamanoededf2b2013-07-15 21:11:161598--from
1599</dt>
1600<dt class="hdlist1">
1601--from=&lt;ident&gt;
1602</dt>
1603<dd>
1604<p>
Junio C Hamano61525f92014-01-17 22:46:491605 Use <tt>ident</tt> in the <tt>From:</tt> header of each commit email. If the
Junio C Hamanoededf2b2013-07-15 21:11:161606 author ident of the commit is not textually identical to the
Junio C Hamano61525f92014-01-17 22:46:491607 provided <tt>ident</tt>, place a <tt>From:</tt> header in the body of the
1608 message with the original author. If no <tt>ident</tt> is given, use
Junio C Hamanoededf2b2013-07-15 21:11:161609 the committer ident.
1610</p>
1611<div class="paragraph"><p>Note that this option is only useful if you are actually sending the
1612emails and want to identify yourself as the sender, but retain the
Junio C Hamano61525f92014-01-17 22:46:491613original author (and <tt>git am</tt> will correctly pick up the in-body
1614header). Note also that <tt>git send-email</tt> already handles this
Junio C Hamanoededf2b2013-07-15 21:11:161615transformation for you, and this option should not be used if you are
Junio C Hamano61525f92014-01-17 22:46:491616feeding the result to <tt>git send-email</tt>.</p></div>
Junio C Hamanoededf2b2013-07-15 21:11:161617</dd>
1618<dt class="hdlist1">
Junio C Hamano9572e922009-04-02 06:52:031619--add-header=&lt;header&gt;
1620</dt>
1621<dd>
1622<p>
1623 Add an arbitrary header to the email headers. This is in addition
1624 to any configured headers, and may be used multiple times.
Junio C Hamano61525f92014-01-17 22:46:491625 For example, <tt>--add-header="Organization: git-foo"</tt>.
1626 The negated form <tt>--no-add-header</tt> discards <strong>all</strong> (<tt>To:</tt>,
1627 <tt>Cc:</tt>, and custom) headers added so far from config or command
Junio C Hamano7bd050f2011-09-22 06:32:221628 line.
Junio C Hamano9572e922009-04-02 06:52:031629</p>
1630</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591631<dt class="hdlist1">
Junio C Hamanoea3b7522013-04-18 19:37:531632--[no-]cover-letter
Junio C Hamano24bc09a2008-02-28 00:27:441633</dt>
1634<dd>
1635<p>
Junio C Hamano92a4abd2008-08-15 05:34:441636 In addition to the patches, generate a cover letter file
1637 containing the shortlog and the overall diffstat. You can
1638 fill in a description in the file before sending it out.
Junio C Hamano24bc09a2008-02-28 00:27:441639</p>
1640</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591641<dt class="hdlist1">
Junio C Hamano4eb2b9c2012-11-15 21:12:291642--notes[=&lt;ref&gt;]
1643</dt>
1644<dd>
1645<p>
1646 Append the notes (see <a href="git-notes.html">git-notes(1)</a>) for the commit
1647 after the three-dash line.
1648</p>
1649<div class="paragraph"><p>The expected use case of this is to write supporting explanation for
1650the commit that does not belong to the commit log message proper,
1651and include it with the patch submission. While one can simply write
Junio C Hamano61525f92014-01-17 22:46:491652these explanations after <tt>format-patch</tt> has run but before sending,
Junio C Hamano076ffcc2013-02-06 05:13:211653keeping them as Git notes allows them to be maintained between versions
Junio C Hamano61525f92014-01-17 22:46:491654of the patch series (but see the discussion of the <tt>notes.rewrite</tt>
Junio C Hamano4eb2b9c2012-11-15 21:12:291655configuration options in <a href="git-notes.html">git-notes(1)</a> to use this workflow).</p></div>
1656</dd>
1657<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551658--[no]-signature=&lt;signature&gt;
1659</dt>
1660<dd>
1661<p>
1662 Add a signature to each message produced. Per RFC 3676 the signature
Junio C Hamano68cf15a2010-11-06 01:01:591663 is separated from the body by a line with '-- ' on it. If the
Junio C Hamano076ffcc2013-02-06 05:13:211664 signature option is omitted the signature defaults to the Git version
Junio C Hamano89a57342010-06-22 23:22:551665 number.
1666</p>
1667</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591668<dt class="hdlist1">
Junio C Hamano4f9a6052007-01-17 20:25:161669--suffix=.&lt;sfx&gt;
1670</dt>
1671<dd>
1672<p>
Junio C Hamano61525f92014-01-17 22:46:491673 Instead of using <tt>.patch</tt> as the suffix for generated
Junio C Hamanoa6387422007-08-25 03:54:271674 filenames, use specified suffix. A common alternative is
Junio C Hamano61525f92014-01-17 22:46:491675 <tt>--suffix=.txt</tt>. Leaving this empty will remove the <tt>.patch</tt>
Junio C Hamanof4581102009-04-25 08:29:591676 suffix.
Junio C Hamano4f9a6052007-01-17 20:25:161677</p>
Junio C Hamano68cf15a2010-11-06 01:01:591678<div class="paragraph"><p>Note that the leading character does not have to be a dot; for example,
Junio C Hamano61525f92014-01-17 22:46:491679you can use <tt>--suffix=-patch</tt> to get <tt>0001-description-of-my-change-patch</tt>.</p></div>
Junio C Hamano4f9a6052007-01-17 20:25:161680</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591681<dt class="hdlist1">
Junio C Hamano535ed7a2013-09-04 20:35:571682-q
1683</dt>
1684<dt class="hdlist1">
Junio C Hamano209ebe82011-04-27 21:09:591685--quiet
1686</dt>
1687<dd>
1688<p>
1689 Do not print the names of the generated files to standard output.
1690</p>
1691</dd>
1692<dt class="hdlist1">
Junio C Hamano869bb802008-05-12 00:29:471693--no-binary
1694</dt>
1695<dd>
1696<p>
Junio C Hamanof4581102009-04-25 08:29:591697 Do not output contents of changes in binary files, instead
1698 display a notice that those files changed. Patches generated
1699 using this option cannot be applied properly, but they are
1700 still useful for code review.
Junio C Hamano869bb802008-05-12 00:29:471701</p>
1702</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591703<dt class="hdlist1">
Junio C Hamano9572e922009-04-02 06:52:031704--root
1705</dt>
1706<dd>
1707<p>
1708 Treat the revision argument as a &lt;revision range&gt;, even if it
1709 is just a single commit (that would normally be treated as a
1710 &lt;since&gt;). Note that root commits included in the specified
1711 range are always formatted as creation patches, independently
1712 of this flag.
1713</p>
1714</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311715</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231716</div>
Junio C Hamano9629d4f2012-12-19 00:28:271717</div>
1718<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311719<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamano2496ae42006-03-11 08:04:331720<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591721<div class="paragraph"><p>You can specify extra mail header lines to be added to each message,
Junio C Hamanof4581102009-04-25 08:29:591722defaults for the subject prefix and file suffix, number patches when
Junio C Hamanoea90ab32010-03-15 20:32:551723outputting more than one patch, add "To" or "Cc:" headers, configure
1724attachments, and sign off patches with configuration variables.</p></div>
Junio C Hamano7c73c662007-01-19 00:37:501725<div class="listingblock">
Junio C Hamano2496ae42006-03-11 08:04:331726<div class="content">
Junio C Hamano61525f92014-01-17 22:46:491727<pre><tt>[format]
Junio C Hamano7c73c662007-01-19 00:37:501728 headers = "Organization: git-foo\n"
Junio C Hamano1d90cb02007-07-03 07:05:311729 subjectprefix = CHANGE
Junio C Hamano8c5802d2007-11-15 00:13:361730 suffix = .txt
Junio C Hamano2fbcd212008-05-14 22:26:071731 numbered = auto
Junio C Hamanoea90ab32010-03-15 20:32:551732 to = &lt;email&gt;
Junio C Hamano0a235222009-03-06 08:21:091733 cc = &lt;email&gt;
Junio C Hamano5f9a6f02009-04-06 08:26:561734 attach [ = mime-boundary-string ]
Junio C Hamanoea3b7522013-04-18 19:37:531735 signoff = true
Junio C Hamano61525f92014-01-17 22:46:491736 coverletter = auto</tt></pre>
Junio C Hamano4f9a6052007-01-17 20:25:161737</div></div>
Junio C Hamano2496ae42006-03-11 08:04:331738</div>
Junio C Hamano9629d4f2012-12-19 00:28:271739</div>
1740<div class="sect1">
Junio C Hamanob77f8192011-05-05 01:30:381741<h2 id="_discussion">DISCUSSION</h2>
1742<div class="sectionbody">
1743<div class="paragraph"><p>The patch produced by <em>git format-patch</em> is in UNIX mailbox format,
1744with a fixed "magic" time stamp to indicate that the file is output
1745from format-patch rather than a real mailbox, like so:</p></div>
1746<div class="listingblock">
1747<div class="content">
Junio C Hamano61525f92014-01-17 22:46:491748<pre><tt>From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001
Junio C Hamanob77f8192011-05-05 01:30:381749From: Tony Luck &lt;tony.luck@intel.com&gt;
1750Date: Tue, 13 Jul 2010 11:42:54 -0700
1751Subject: [PATCH] =?UTF-8?q?[IA64]=20Put=20ia64=20config=20files=20on=20the=20?=
1752 =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?=
1753MIME-Version: 1.0
1754Content-Type: text/plain; charset=UTF-8
1755Content-Transfer-Encoding: 8bit
1756
1757arch/arm config files were slimmed down using a python script
1758(See commit c2330e286f68f1c408b4aa6515ba49d57f05beae comment)
1759
1760Do the same for ia64 so we can have sleek &amp; trim looking
Junio C Hamano61525f92014-01-17 22:46:491761...</tt></pre>
Junio C Hamanob77f8192011-05-05 01:30:381762</div></div>
1763<div class="paragraph"><p>Typically it will be placed in a MUA&#8217;s drafts folder, edited to add
1764timely commentary that should not go in the changelog after the three
1765dashes, and then sent as a message whose body, in our example, starts
1766with "arch/arm config files were&#8230;". On the receiving end, readers
1767can save interesting patches in a UNIX mailbox and apply them with
Junio C Hamanoa28a9202012-06-21 07:08:231768<a href="git-am.html">git-am(1)</a>.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381769<div class="paragraph"><p>When a patch is part of an ongoing discussion, the patch generated by
1770<em>git format-patch</em> can be tweaked to take advantage of the <em>git am
1771--scissors</em> feature. After your response to the discussion comes a
Junio C Hamano61525f92014-01-17 22:46:491772line that consists solely of "<tt>-- &gt;8 --</tt>" (scissors and perforation),
Junio C Hamanob77f8192011-05-05 01:30:381773followed by the patch with unnecessary header fields removed:</p></div>
1774<div class="listingblock">
1775<div class="content">
Junio C Hamano61525f92014-01-17 22:46:491776<pre><tt>...
Junio C Hamanob77f8192011-05-05 01:30:381777&gt; So we should do such-and-such.
1778
1779Makes sense to me. How about this patch?
1780
1781-- &gt;8 --
1782Subject: [IA64] Put ia64 config files on the Uwe Kleine-König diet
1783
1784arch/arm config files were slimmed down using a python script
Junio C Hamano61525f92014-01-17 22:46:491785...</tt></pre>
Junio C Hamanob77f8192011-05-05 01:30:381786</div></div>
1787<div class="paragraph"><p>When sending a patch this way, most often you are sending your own
Junio C Hamano61525f92014-01-17 22:46:491788patch, so in addition to the "<tt>From $SHA1 $magic_timestamp</tt>" marker you
1789should omit <tt>From:</tt> and <tt>Date:</tt> lines from the patch file. The patch
Junio C Hamanob77f8192011-05-05 01:30:381790title is likely to be different from the subject of the discussion the
1791patch is in response to, so it is likely that you would want to keep
1792the Subject: line, like the example above.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271793<div class="sect2">
1794<h3 id="_checking_for_patch_corruption">Checking for patch corruption</h3>
Junio C Hamanob77f8192011-05-05 01:30:381795<div class="paragraph"><p>Many mailers if not set up properly will corrupt whitespace. Here are
1796two common types of corruption:</p></div>
1797<div class="ulist"><ul>
1798<li>
1799<p>
1800Empty context lines that do not have <em>any</em> whitespace.
1801</p>
1802</li>
1803<li>
1804<p>
1805Non-empty context lines that have one extra whitespace at the
1806 beginning.
1807</p>
1808</li>
1809</ul></div>
1810<div class="paragraph"><p>One way to test if your MUA is set up correctly is:</p></div>
1811<div class="ulist"><ul>
1812<li>
1813<p>
1814Send the patch to yourself, exactly the way you would, except
1815 with To: and Cc: lines that do not contain the list and
1816 maintainer address.
1817</p>
1818</li>
1819<li>
1820<p>
1821Save that patch to a file in UNIX mailbox format. Call it a.patch,
1822 say.
1823</p>
1824</li>
1825<li>
1826<p>
1827Apply it:
1828</p>
1829<div class="literalblock">
1830<div class="content">
Junio C Hamano61525f92014-01-17 22:46:491831<pre><tt>$ git fetch &lt;project&gt; master:test-apply
Junio C Hamanob77f8192011-05-05 01:30:381832$ git checkout test-apply
1833$ git reset --hard
Junio C Hamano61525f92014-01-17 22:46:491834$ git am a.patch</tt></pre>
Junio C Hamanob77f8192011-05-05 01:30:381835</div></div>
1836</li>
1837</ul></div>
1838<div class="paragraph"><p>If it does not apply correctly, there can be various reasons.</p></div>
1839<div class="ulist"><ul>
1840<li>
1841<p>
1842The patch itself does not apply cleanly. That is <em>bad</em> but
1843 does not have much to do with your MUA. You might want to rebase
Junio C Hamanoa28a9202012-06-21 07:08:231844 the patch with <a href="git-rebase.html">git-rebase(1)</a> before regenerating it in
Junio C Hamanob77f8192011-05-05 01:30:381845 this case.
1846</p>
1847</li>
1848<li>
1849<p>
1850The MUA corrupted your patch; "am" would complain that
1851 the patch does not apply. Look in the .git/rebase-apply/ subdirectory and
1852 see what <em>patch</em> file contains and check for the common
1853 corruption patterns mentioned above.
1854</p>
1855</li>
1856<li>
1857<p>
1858While at it, check the <em>info</em> and <em>final-commit</em> files as well.
1859 If what is in <em>final-commit</em> is not exactly what you would want to
1860 see in the commit log message, it is very likely that the
1861 receiver would end up hand editing the log message when applying
1862 your patch. Things like "Hi, this is my first patch.\n" in the
1863 patch e-mail should come after the three-dash line that signals
1864 the end of the commit message.
1865</p>
1866</li>
1867</ul></div>
1868</div>
Junio C Hamano9629d4f2012-12-19 00:28:271869</div>
1870</div>
1871<div class="sect1">
Junio C Hamanob77f8192011-05-05 01:30:381872<h2 id="_mua_specific_hints">MUA-SPECIFIC HINTS</h2>
1873<div class="sectionbody">
1874<div class="paragraph"><p>Here are some hints on how to successfully submit patches inline using
1875various mailers.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271876<div class="sect2">
1877<h3 id="_gmail">GMail</h3>
Junio C Hamanob77f8192011-05-05 01:30:381878<div class="paragraph"><p>GMail does not have any way to turn off line wrapping in the web
1879interface, so it will mangle any emails that you send. You can however
1880use "git send-email" and send your patches through the GMail SMTP server, or
1881use any IMAP email client to connect to the google IMAP server and forward
1882the emails through that.</p></div>
1883<div class="paragraph"><p>For hints on using <em>git send-email</em> to send your patches through the
Junio C Hamanoa28a9202012-06-21 07:08:231884GMail 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:381885<div class="paragraph"><p>For hints on submission using the IMAP interface, see the EXAMPLE
Junio C Hamanoa28a9202012-06-21 07:08:231886section of <a href="git-imap-send.html">git-imap-send(1)</a>.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271887</div>
1888<div class="sect2">
1889<h3 id="_thunderbird">Thunderbird</h3>
Junio C Hamanob77f8192011-05-05 01:30:381890<div class="paragraph"><p>By default, Thunderbird will both wrap emails as well as flag
1891them as being <em>format=flowed</em>, both of which will make the
Junio C Hamano076ffcc2013-02-06 05:13:211892resulting email unusable by Git.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381893<div class="paragraph"><p>There are three different approaches: use an add-on to turn off line wraps,
1894configure Thunderbird to not mangle patches, or use
1895an external editor to keep Thunderbird from mangling the patches.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271896<div class="sect3">
Junio C Hamanob77f8192011-05-05 01:30:381897<h4 id="_approach_1_add_on">Approach #1 (add-on)</h4>
1898<div class="paragraph"><p>Install the Toggle Word Wrap add-on that is available from
1899<a href="https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/">https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/</a>
1900It adds a menu entry "Enable Word Wrap" in the composer&#8217;s "Options" menu
1901that you can tick off. Now you can compose the message as you otherwise do
1902(cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc), but you have to
1903insert line breaks manually in any text that you type.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271904</div>
1905<div class="sect3">
Junio C Hamanob77f8192011-05-05 01:30:381906<h4 id="_approach_2_configuration">Approach #2 (configuration)</h4>
1907<div class="paragraph"><p>Three steps:</p></div>
1908<div class="olist arabic"><ol class="arabic">
1909<li>
1910<p>
1911Configure your mail server composition as plain text:
1912 Edit&#8230;Account Settings&#8230;Composition &amp; Addressing,
1913 uncheck "Compose Messages in HTML".
1914</p>
1915</li>
1916<li>
1917<p>
1918Configure your general composition window to not wrap.
1919</p>
1920<div class="paragraph"><p>In Thunderbird 2:
1921Edit..Preferences..Composition, wrap plain text messages at 0</p></div>
1922<div class="paragraph"><p>In Thunderbird 3:
1923Edit..Preferences..Advanced..Config Editor. Search for
1924"mail.wrap_long_lines".
Junio C Hamano61525f92014-01-17 22:46:491925Toggle it to make sure it is set to <tt>false</tt>. Also, search for
Junio C Hamano369e3402013-10-15 18:40:251926"mailnews.wraplength" and set the value to 0.</p></div>
Junio C Hamanob77f8192011-05-05 01:30:381927</li>
1928<li>
1929<p>
1930Disable the use of format=flowed:
1931Edit..Preferences..Advanced..Config Editor. Search for
1932"mailnews.send_plaintext_flowed".
Junio C Hamano61525f92014-01-17 22:46:491933Toggle it to make sure it is set to <tt>false</tt>.
Junio C Hamanob77f8192011-05-05 01:30:381934</p>
1935</li>
1936</ol></div>
1937<div class="paragraph"><p>After that is done, you should be able to compose email as you
1938otherwise would (cut + paste, <em>git format-patch</em> | <em>git imap-send</em>, etc),
1939and the patches will not be mangled.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271940</div>
1941<div class="sect3">
Junio C Hamanob77f8192011-05-05 01:30:381942<h4 id="_approach_3_external_editor">Approach #3 (external editor)</h4>
1943<div class="paragraph"><p>The following Thunderbird extensions are needed:
1944AboutConfig from <a href="http://aboutconfig.mozdev.org/">http://aboutconfig.mozdev.org/</a> and
1945External 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>
1946<div class="olist arabic"><ol class="arabic">
1947<li>
1948<p>
1949Prepare the patch as a text file using your method of choice.
1950</p>
1951</li>
1952<li>
1953<p>
1954Before opening a compose window, use Edit&#8594;Account Settings to
1955 uncheck the "Compose messages in HTML format" setting in the
1956 "Composition &amp; Addressing" panel of the account to be used to
1957 send the patch.
1958</p>
1959</li>
1960<li>
1961<p>
1962In the main Thunderbird window, <em>before</em> you open the compose
1963 window for the patch, use Tools&#8594;about:config to set the
1964 following to the indicated values:
1965</p>
1966<div class="listingblock">
1967<div class="content">
Junio C Hamano61525f92014-01-17 22:46:491968<pre><tt> mailnews.send_plaintext_flowed =&gt; false
1969 mailnews.wraplength =&gt; 0</tt></pre>
Junio C Hamanob77f8192011-05-05 01:30:381970</div></div>
1971</li>
1972<li>
1973<p>
1974Open a compose window and click the external editor icon.
1975</p>
1976</li>
1977<li>
1978<p>
1979In the external editor window, read in the patch file and exit
1980 the editor normally.
1981</p>
1982</li>
1983</ol></div>
1984<div class="paragraph"><p>Side note: it may be possible to do step 2 with
1985about:config and the following settings but no one&#8217;s tried yet.</p></div>
1986<div class="listingblock">
1987<div class="content">
Junio C Hamano61525f92014-01-17 22:46:491988<pre><tt> mail.html_compose =&gt; false
Junio C Hamanob77f8192011-05-05 01:30:381989 mail.identity.default.compose_html =&gt; false
Junio C Hamano61525f92014-01-17 22:46:491990 mail.identity.id?.compose_html =&gt; false</tt></pre>
Junio C Hamanob77f8192011-05-05 01:30:381991</div></div>
1992<div class="paragraph"><p>There is a script in contrib/thunderbird-patch-inline which can help
1993you include patches with Thunderbird in an easy way. To use it, do the
1994steps above and then use the script as the external editor.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271995</div>
1996</div>
1997<div class="sect2">
1998<h3 id="_kmail">KMail</h3>
Junio C Hamanob77f8192011-05-05 01:30:381999<div class="paragraph"><p>This should help you to submit patches inline using KMail.</p></div>
2000<div class="olist arabic"><ol class="arabic">
2001<li>
2002<p>
2003Prepare the patch as a text file.
2004</p>
2005</li>
2006<li>
2007<p>
2008Click on New Mail.
2009</p>
2010</li>
2011<li>
2012<p>
2013Go under "Options" in the Composer window and be sure that
2014 "Word wrap" is not set.
2015</p>
2016</li>
2017<li>
2018<p>
2019Use Message &#8594; Insert file&#8230; and insert the patch.
2020</p>
2021</li>
2022<li>
2023<p>
2024Back in the compose window: add whatever other text you wish to the
2025 message, complete the addressing and subject fields, and press send.
2026</p>
2027</li>
2028</ol></div>
2029</div>
Junio C Hamano9629d4f2012-12-19 00:28:272030</div>
2031</div>
2032<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312033<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232034<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592035<div class="ulist"><ul>
Junio C Hamano6d76d612008-05-09 05:46:082036<li>
Junio C Hamano1a4e8412005-12-27 08:17:232037<p>
Junio C Hamano6d76d612008-05-09 05:46:082038Extract commits between revisions R1 and R2, and apply them on top of
Junio C Hamano1aa40d22010-01-21 17:46:432039the current branch using <em>git am</em> to cherry-pick them:
Junio C Hamano1a4e8412005-12-27 08:17:232040</p>
Junio C Hamano6d76d612008-05-09 05:46:082041<div class="listingblock">
2042<div class="content">
Junio C Hamano61525f92014-01-17 22:46:492043<pre><tt>$ git format-patch -k --stdout R1..R2 | git am -3 -k</tt></pre>
Junio C Hamano6d76d612008-05-09 05:46:082044</div></div>
2045</li>
2046<li>
Junio C Hamano1a4e8412005-12-27 08:17:232047<p>
Junio C Hamano6d76d612008-05-09 05:46:082048Extract all commits which are in the current branch but not in the
2049origin branch:
Junio C Hamano1a4e8412005-12-27 08:17:232050</p>
Junio C Hamano6d76d612008-05-09 05:46:082051<div class="listingblock">
2052<div class="content">
Junio C Hamano61525f92014-01-17 22:46:492053<pre><tt>$ git format-patch origin</tt></pre>
Junio C Hamano6d76d612008-05-09 05:46:082054</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592055<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:082056</li>
2057<li>
Junio C Hamano7d9e9bd2007-08-29 07:31:472058<p>
Junio C Hamano6d76d612008-05-09 05:46:082059Extract all commits that lead to <em>origin</em> since the inception of the
2060project:
Junio C Hamano7d9e9bd2007-08-29 07:31:472061</p>
Junio C Hamano6d76d612008-05-09 05:46:082062<div class="listingblock">
2063<div class="content">
Junio C Hamano61525f92014-01-17 22:46:492064<pre><tt>$ git format-patch --root origin</tt></pre>
Junio C Hamano6d76d612008-05-09 05:46:082065</div></div>
2066</li>
2067<li>
Junio C Hamano1a4e8412005-12-27 08:17:232068<p>
Junio C Hamano6d76d612008-05-09 05:46:082069The same as the previous one:
Junio C Hamano1a4e8412005-12-27 08:17:232070</p>
Junio C Hamano6d76d612008-05-09 05:46:082071<div class="listingblock">
2072<div class="content">
Junio C Hamano61525f92014-01-17 22:46:492073<pre><tt>$ git format-patch -M -B origin</tt></pre>
Junio C Hamano6d76d612008-05-09 05:46:082074</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592075<div class="paragraph"><p>Additionally, it detects and handles renames and complete rewrites
Junio C Hamano6d76d612008-05-09 05:46:082076intelligently to produce a renaming patch. A renaming patch reduces
Junio C Hamanof4581102009-04-25 08:29:592077the amount of text output, and generally makes it easier to review.
Junio C Hamano076ffcc2013-02-06 05:13:212078Note that non-Git "patch" programs won&#8217;t understand renaming patches, so
2079use it only when you know the recipient uses Git to apply your patch.</p></div>
Junio C Hamano6d76d612008-05-09 05:46:082080</li>
2081<li>
Junio C Hamano7c73c662007-01-19 00:37:502082<p>
Junio C Hamano6d76d612008-05-09 05:46:082083Extract three topmost commits from the current branch and format them
2084as e-mailable patches:
Junio C Hamano7c73c662007-01-19 00:37:502085</p>
Junio C Hamano6d76d612008-05-09 05:46:082086<div class="listingblock">
2087<div class="content">
Junio C Hamano61525f92014-01-17 22:46:492088<pre><tt>$ git format-patch -3</tt></pre>
Junio C Hamano6d76d612008-05-09 05:46:082089</div></div>
2090</li>
Junio C Hamanoba4b9282008-07-06 05:20:312091</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:232092</div>
Junio C Hamano9629d4f2012-12-19 00:28:272093</div>
2094<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312095<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232096<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232097<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:232098</div>
Junio C Hamano9629d4f2012-12-19 00:28:272099</div>
2100<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312101<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232102<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232103<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:232104</div>
Junio C Hamano7bd050f2011-09-22 06:32:222105</div>
Junio C Hamano9629d4f2012-12-19 00:28:272106</div>
Junio C Hamano7bd050f2011-09-22 06:32:222107<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:232108<div id="footer">
2109<div id="footer-text">
Junio C Hamano369e3402013-10-15 18:40:252110Last updated 2013-10-15 11:39:58 PDT
Junio C Hamano1a4e8412005-12-27 08:17:232111</div>
2112</div>
2113</body>
2114</html>