blob: 60601fb19609b1e12d6ab839a2ed559b84c9403b [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 Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-apply(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* 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 Hamano9d971152012-12-19 00:43:1167h5 {
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 Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9d971152012-12-19 00:43:11331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9d971152012-12-19 00:43:11580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9d971152012-12-19 00:43:11670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9d971152012-12-19 00:43:11703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9d971152012-12-19 00:43:11728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-apply(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-apply -
Junio C Hamano5706e0b2009-11-24 10:54:16740 Apply a patch to files and/or to the index
Junio C Hamano1a4e8412005-12-27 08:17:23741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamano235a91e2006-01-07 01:13:58748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git apply</em> [--stat] [--numstat] [--summary] [--check] [--index] [--3way]
Junio C Hamanobd53dbf2009-01-18 18:26:37750 [--apply] [--no-add] [--build-fake-ancestor=&lt;file&gt;] [-R | --reverse]
Junio C Hamano0e3cb532007-04-17 08:28:11751 [--allow-binary-replacement | --binary] [--reject] [-z]
Junio C Hamanod2179ef2010-10-22 04:12:17752 [-p&lt;n&gt;] [-C&lt;n&gt;] [--inaccurate-eof] [--recount] [--cached]
Junio C Hamanofe24db02009-08-22 05:10:47753 [--ignore-space-change | --ignore-whitespace ]
Junio C Hamanod2179ef2010-10-22 04:12:17754 [--whitespace=(nowarn|warn|fix|error|error-all)]
755 [--exclude=&lt;path&gt;] [--include=&lt;path&gt;] [--directory=&lt;root&gt;]
Junio C Hamano9d971152012-12-19 00:43:11756 [--verbose] [&lt;patch&gt;&#8230;]</pre>
757<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59758</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23759</div>
Junio C Hamano9d971152012-12-19 00:43:11760</div>
761<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31762<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23763<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59764<div class="paragraph"><p>Reads the supplied diff output (i.e. "a patch") and applies it to files.
Junio C Hamano9d971152012-12-19 00:43:11765With the <code>--index</code> option the patch is also applied to the index, and
766with the <code>--cached</code> option the patch is only applied to the index.
Junio C Hamano5706e0b2009-11-24 10:54:16767Without these options, the command applies the patch only to files,
Junio C Hamano076ffcc2013-02-06 05:13:21768and does not require them to be in a Git repository.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59769<div class="paragraph"><p>This command applies the patch but does not create a commit. Use
Junio C Hamanoa28a9202012-06-21 07:08:23770<a href="git-am.html">git-am(1)</a> to create commits from patches generated by
771<a href="git-format-patch.html">git-format-patch(1)</a> and/or received by email.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23772</div>
Junio C Hamano9d971152012-12-19 00:43:11773</div>
774<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31775<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23776<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59777<div class="dlist"><dl>
778<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23779&lt;patch&gt;&#8230;
780</dt>
781<dd>
782<p>
Junio C Hamano7924d5e2009-03-03 08:28:48783 The files to read the patch from. <em>-</em> can be used to read
Junio C Hamano1a4e8412005-12-27 08:17:23784 from the standard input.
785</p>
786</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59787<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23788--stat
789</dt>
790<dd>
791<p>
792 Instead of applying the patch, output diffstat for the
793 input. Turns off "apply".
794</p>
795</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59796<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23797--numstat
798</dt>
799<dd>
800<p>
Junio C Hamano9d971152012-12-19 00:43:11801 Similar to <code>--stat</code>, but shows the number of added and
Junio C Hamano7924d5e2009-03-03 08:28:48802 deleted lines in decimal notation and the pathname without
Junio C Hamanod793de52006-12-26 09:11:43803 abbreviation, to make it more machine friendly. For
Junio C Hamano9d971152012-12-19 00:43:11804 binary files, outputs two <code>-</code> instead of saying
805 <code>0 0</code>. Turns off "apply".
Junio C Hamano1a4e8412005-12-27 08:17:23806</p>
807</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59808<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23809--summary
810</dt>
811<dd>
812<p>
813 Instead of applying the patch, output a condensed
814 summary of information obtained from git diff extended
815 headers, such as creations, renames and mode changes.
816 Turns off "apply".
817</p>
818</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59819<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23820--check
821</dt>
822<dd>
823<p>
824 Instead of applying the patch, see if the patch is
Junio C Hamano5706e0b2009-11-24 10:54:16825 applicable to the current working tree and/or the index
Junio C Hamano1a4e8412005-12-27 08:17:23826 file and detects errors. Turns off "apply".
827</p>
828</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59829<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23830--index
831</dt>
832<dd>
833<p>
Junio C Hamano9d971152012-12-19 00:43:11834 When <code>--check</code> is in effect, or when applying the patch
Junio C Hamano1a4e8412005-12-27 08:17:23835 (which is the default when none of the options that
836 disables it is in effect), make sure the patch is
837 applicable to what the current index file records. If
Junio C Hamano5706e0b2009-11-24 10:54:16838 the file to be patched in the working tree is not
Junio C Hamano1a4e8412005-12-27 08:17:23839 up-to-date, it is flagged as an error. This flag also
840 causes the index file to be updated.
841</p>
842</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59843<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31844--cached
845</dt>
846<dd>
847<p>
Junio C Hamano7924d5e2009-03-03 08:28:48848 Apply a patch without touching the working tree. Instead take the
849 cached data, apply the patch, and store the result in the index
Junio C Hamano9d971152012-12-19 00:43:11850 without using the working tree. This implies <code>--index</code>.
Junio C Hamano6b2cee12006-08-26 08:43:31851</p>
852</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59853<dt class="hdlist1">
Junio C Hamano02482692012-07-16 05:28:39854-3
855</dt>
856<dt class="hdlist1">
857--3way
858</dt>
859<dd>
860<p>
861 When the patch does not apply cleanly, fall back on 3-way merge if
862 the patch records the identity of blobs it is supposed to apply to,
863 and we have those blobs available locally, possibly leaving the
864 conflict markers in the files in the working tree for the user to
Junio C Hamano9d971152012-12-19 00:43:11865 resolve. This option implies the <code>--index</code> option, and is incompatible
866 with the <code>--reject</code> and the <code>--cached</code> options.
Junio C Hamano02482692012-07-16 05:28:39867</p>
868</dd>
869<dt class="hdlist1">
Junio C Hamanobd53dbf2009-01-18 18:26:37870--build-fake-ancestor=&lt;file&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23871</dt>
872<dd>
873<p>
Junio C Hamano1aa40d22010-01-21 17:46:43874 Newer <em>git diff</em> output has embedded <em>index information</em>
Junio C Hamano1a4e8412005-12-27 08:17:23875 for each blob to help identify the original version that
876 the patch applies to. When this flag is given, and if
Junio C Hamano7924d5e2009-03-03 08:28:48877 the original versions of the blobs are available locally,
Junio C Hamano01d8f832007-09-24 07:37:30878 builds a temporary index containing those blobs.
Junio C Hamano1a4e8412005-12-27 08:17:23879</p>
Junio C Hamano68cf15a2010-11-06 01:01:59880<div class="paragraph"><p>When a pure mode change is encountered (which has no index information),
Junio C Hamanoba4b9282008-07-06 05:20:31881the information is read from the current index instead.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23882</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59883<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47884-R
885</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59886<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47887--reverse
Junio C Hamano6b2cee12006-08-26 08:43:31888</dt>
889<dd>
890<p>
891 Apply the patch in reverse.
892</p>
893</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59894<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31895--reject
896</dt>
897<dd>
898<p>
Junio C Hamano1aa40d22010-01-21 17:46:43899 For atomicity, <em>git apply</em> by default fails the whole patch and
Junio C Hamano6b2cee12006-08-26 08:43:31900 does not touch the working tree when some of the hunks
901 do not apply. This option makes it apply
Junio C Hamano9adfc6a2006-08-28 07:18:38902 the parts of the patch that are applicable, and leave the
903 rejected hunks in corresponding *.rej files.
Junio C Hamano6b2cee12006-08-26 08:43:31904</p>
905</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59906<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23907-z
908</dt>
909<dd>
910<p>
Junio C Hamano9d971152012-12-19 00:43:11911 When <code>--numstat</code> has been given, do not munge pathnames,
Junio C Hamano5706e0b2009-11-24 10:54:16912 but use a NUL-terminated machine-readable format.
Junio C Hamano1a4e8412005-12-27 08:17:23913</p>
Junio C Hamano68cf15a2010-11-06 01:01:59914<div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
Junio C Hamano9d971152012-12-19 00:43:11915and backslash characters replaced with <code>\t</code>, <code>\n</code>, <code>\"</code>, and <code>\\</code>,
Junio C Hamano5706e0b2009-11-24 10:54:16916respectively, and the pathname will be enclosed in double quotes if
917any of those replacements occurred.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23918</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59919<dt class="hdlist1">
Junio C Hamano8af15b02006-02-01 00:59:26920-p&lt;n&gt;
921</dt>
922<dd>
923<p>
924 Remove &lt;n&gt; leading slashes from traditional diff paths. The
925 default is 1.
926</p>
927</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59928<dt class="hdlist1">
Junio C Hamano54559c82006-04-13 07:45:12929-C&lt;n&gt;
930</dt>
931<dd>
932<p>
933 Ensure at least &lt;n&gt; lines of surrounding context match before
934 and after each change. When fewer lines of surrounding
Junio C Hamano33db4372006-06-07 19:51:45935 context exist they all must match. By default no context is
Junio C Hamano54559c82006-04-13 07:45:12936 ever ignored.
937</p>
938</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59939<dt class="hdlist1">
Junio C Hamano3eb513f2006-09-18 02:47:16940--unidiff-zero
941</dt>
942<dd>
943<p>
Junio C Hamano1aa40d22010-01-21 17:46:43944 By default, <em>git apply</em> expects that the patch being
Junio C Hamano3eb513f2006-09-18 02:47:16945 applied is a unified diff with at least one line of context.
946 This provides good safety measures, but breaks down when
Junio C Hamano9d971152012-12-19 00:43:11947 applying a diff generated with <code>--unified=0</code>. To bypass these
948 checks use <code>--unidiff-zero</code>.
Junio C Hamano3eb513f2006-09-18 02:47:16949</p>
Junio C Hamano68cf15a2010-11-06 01:01:59950<div class="paragraph"><p>Note, for the reasons stated above usage of context-free patches is
Junio C Hamanoba4b9282008-07-06 05:20:31951discouraged.</p></div>
Junio C Hamano3eb513f2006-09-18 02:47:16952</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59953<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23954--apply
955</dt>
956<dd>
957<p>
Junio C Hamano6b2cee12006-08-26 08:43:31958 If you use any of the options marked "Turns off
Junio C Hamano1aa40d22010-01-21 17:46:43959 <em>apply</em>" above, <em>git apply</em> reads and outputs the
Junio C Hamano7924d5e2009-03-03 08:28:48960 requested information without actually applying the
Junio C Hamano1a4e8412005-12-27 08:17:23961 patch. Give this flag after those flags to also apply
962 the patch.
963</p>
964</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59965<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23966--no-add
967</dt>
968<dd>
969<p>
970 When applying a patch, ignore additions made by the
Junio C Hamano3a702342007-12-12 21:34:02971 patch. This can be used to extract the common part between
Junio C Hamanoba4b9282008-07-06 05:20:31972 two files by first running <em>diff</em> on them and applying
Junio C Hamano1a4e8412005-12-27 08:17:23973 the result with this option, which would apply the
Junio C Hamano7924d5e2009-03-03 08:28:48974 deletion part but not the addition part.
Junio C Hamano1a4e8412005-12-27 08:17:23975</p>
976</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59977<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47978--allow-binary-replacement
979</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59980<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47981--binary
Junio C Hamano1a4e8412005-12-27 08:17:23982</dt>
983<dd>
984<p>
Junio C Hamanofd73d892006-09-14 07:38:22985 Historically we did not allow binary patch applied
986 without an explicit permission from the user, and this
987 flag was the way to do so. Currently we always allow binary
988 patch application, so this is a no-op.
Junio C Hamano1a4e8412005-12-27 08:17:23989</p>
990</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59991<dt class="hdlist1">
Junio C Hamano6b2cee12006-08-26 08:43:31992--exclude=&lt;path-pattern&gt;
993</dt>
994<dd>
995<p>
Junio C Hamano68cf15a2010-11-06 01:01:59996 Don&#8217;t apply changes to files matching the given path pattern. This can
Junio C Hamano6b2cee12006-08-26 08:43:31997 be useful when importing patchsets, where you want to exclude certain
998 files or directories.
999</p>
1000</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591001<dt class="hdlist1">
Junio C Hamanoa476efa2008-10-10 15:31:421002--include=&lt;path-pattern&gt;
1003</dt>
1004<dd>
1005<p>
1006 Apply changes to files matching the given path pattern. This can
1007 be useful when importing patchsets, where you want to include certain
1008 files or directories.
1009</p>
Junio C Hamano9d971152012-12-19 00:43:111010<div class="paragraph"><p>When <code>--exclude</code> and <code>--include</code> patterns are used, they are examined in the
Junio C Hamanoa476efa2008-10-10 15:31:421011order they appear on the command line, and the first match determines if a
1012patch to each path is used. A patch to a path that does not match any
1013include/exclude pattern is used by default if there is no include pattern
1014on the command line, and ignored if there is any include pattern.</p></div>
1015</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591016<dt class="hdlist1">
Junio C Hamanofe24db02009-08-22 05:10:471017--ignore-space-change
1018</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591019<dt class="hdlist1">
Junio C Hamanofe24db02009-08-22 05:10:471020--ignore-whitespace
1021</dt>
1022<dd>
1023<p>
1024 When applying a patch, ignore changes in whitespace in context
1025 lines if necessary.
1026 Context lines will preserve their whitespace, and they will not
1027 undergo whitespace fixing regardless of the value of the
Junio C Hamano9d971152012-12-19 00:43:111028 <code>--whitespace</code> option. New lines will still be fixed, though.
Junio C Hamanofe24db02009-08-22 05:10:471029</p>
1030</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591031<dt class="hdlist1">
Junio C Hamano942b35e2007-12-09 10:19:331032--whitespace=&lt;action&gt;
Junio C Hamano5f327762006-03-02 09:14:511033</dt>
1034<dd>
1035<p>
Junio C Hamano942b35e2007-12-09 10:19:331036 When applying a patch, detect a new or modified line that has
1037 whitespace errors. What are considered whitespace errors is
Junio C Hamano9d971152012-12-19 00:43:111038 controlled by <code>core.whitespace</code> configuration. By default,
Junio C Hamano942b35e2007-12-09 10:19:331039 trailing whitespaces (including lines that solely consist of
1040 whitespaces) and a space character that is immediately followed
1041 by a tab character inside the initial indent of the line are
1042 considered whitespace errors.
Junio C Hamano5f327762006-03-02 09:14:511043</p>
Junio C Hamano68cf15a2010-11-06 01:01:591044<div class="paragraph"><p>By default, the command outputs warning messages but applies the patch.
Junio C Hamano9d971152012-12-19 00:43:111045When <code>git-apply</code> is used for statistics and not applying a
1046patch, it defaults to <code>nowarn</code>.</p></div>
1047<div class="paragraph"><p>You can use different <code>&lt;action&gt;</code> values to control this
Junio C Hamanoba4b9282008-07-06 05:20:311048behavior:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591049<div class="ulist"><ul>
Junio C Hamano5f327762006-03-02 09:14:511050<li>
1051<p>
Junio C Hamano9d971152012-12-19 00:43:111052<code>nowarn</code> turns off the trailing whitespace warning.
Junio C Hamano5f327762006-03-02 09:14:511053</p>
1054</li>
1055<li>
1056<p>
Junio C Hamano9d971152012-12-19 00:43:111057<code>warn</code> outputs warnings for a few such errors, but applies the
Junio C Hamano942b35e2007-12-09 10:19:331058 patch as-is (default).
1059</p>
1060</li>
1061<li>
1062<p>
Junio C Hamano9d971152012-12-19 00:43:111063<code>fix</code> outputs warnings for a few such errors, and applies the
1064 patch after fixing them (<code>strip</code> is a synonym --- the tool
Junio C Hamano7924d5e2009-03-03 08:28:481065 used to consider only trailing whitespace characters as errors, and the
Junio C Hamano076ffcc2013-02-06 05:13:211066 fix involved <em>stripping</em> them, but modern Gits do more).
Junio C Hamano5f327762006-03-02 09:14:511067</p>
1068</li>
1069<li>
1070<p>
Junio C Hamano9d971152012-12-19 00:43:111071<code>error</code> outputs warnings for a few such errors, and refuses
Junio C Hamano5f327762006-03-02 09:14:511072 to apply the patch.
1073</p>
1074</li>
1075<li>
1076<p>
Junio C Hamano9d971152012-12-19 00:43:111077<code>error-all</code> is similar to <code>error</code> but shows all errors.
Junio C Hamano5f327762006-03-02 09:14:511078</p>
1079</li>
Junio C Hamanoba4b9282008-07-06 05:20:311080</ul></div>
Junio C Hamano5f327762006-03-02 09:14:511081</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591082<dt class="hdlist1">
Junio C Hamano3a971022006-11-18 22:17:581083--inaccurate-eof
Junio C Hamano6b2cee12006-08-26 08:43:311084</dt>
1085<dd>
1086<p>
Junio C Hamanoba4b9282008-07-06 05:20:311087 Under certain circumstances, some versions of <em>diff</em> do not correctly
Junio C Hamano6b2cee12006-08-26 08:43:311088 detect a missing new-line at the end of the file. As a result, patches
Junio C Hamanoba4b9282008-07-06 05:20:311089 created by such <em>diff</em> programs do not record incomplete lines
Junio C Hamano6b2cee12006-08-26 08:43:311090 correctly. This option adds support for applying such patches by
1091 working around this bug.
1092</p>
1093</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591094<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471095-v
1096</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591097<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471098--verbose
Junio C Hamano6b2cee12006-08-26 08:43:311099</dt>
1100<dd>
1101<p>
1102 Report progress to stderr. By default, only a message about the
1103 current patch being applied will be printed. This option will cause
1104 additional information to be reported.
1105</p>
1106</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591107<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:381108--recount
1109</dt>
1110<dd>
1111<p>
1112 Do not trust the line counts in the hunk headers, but infer them
1113 by inspecting the patch (e.g. after editing the patch without
1114 adjusting the hunk headers appropriately).
1115</p>
1116</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591117<dt class="hdlist1">
Junio C Hamano208beb72008-07-10 02:30:501118--directory=&lt;root&gt;
1119</dt>
1120<dd>
1121<p>
Junio C Hamano7924d5e2009-03-03 08:28:481122 Prepend &lt;root&gt; to all filenames. If a "-p" argument was also passed,
Junio C Hamano208beb72008-07-10 02:30:501123 it is applied before prepending the new root.
1124</p>
Junio C Hamano9d971152012-12-19 00:43:111125<div class="paragraph"><p>For example, a patch that talks about updating <code>a/git-gui.sh</code> to <code>b/git-gui.sh</code>
1126can be applied to the file in the working tree <code>modules/git-gui/git-gui.sh</code> by
1127running <code>git apply --directory=modules/git-gui</code>.</p></div>
Junio C Hamano208beb72008-07-10 02:30:501128</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311129</dl></div>
Junio C Hamano5f327762006-03-02 09:14:511130</div>
Junio C Hamano9d971152012-12-19 00:43:111131</div>
1132<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311133<h2 id="_configuration">Configuration</h2>
Junio C Hamano5f327762006-03-02 09:14:511134<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591135<div class="dlist"><dl>
1136<dt class="hdlist1">
Junio C Hamanofe24db02009-08-22 05:10:471137apply.ignorewhitespace
1138</dt>
1139<dd>
1140<p>
1141 Set to <em>change</em> if you want changes in whitespace to be ignored by default.
1142 Set to one of: no, none, never, false if you want changes in
1143 whitespace to be significant.
1144</p>
1145</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591146<dt class="hdlist1">
Junio C Hamano5f327762006-03-02 09:14:511147apply.whitespace
1148</dt>
1149<dd>
1150<p>
Junio C Hamano9d971152012-12-19 00:43:111151 When no <code>--whitespace</code> flag is given from the command
Junio C Hamano5f327762006-03-02 09:14:511152 line, this configuration item is used as the default.
1153</p>
1154</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311155</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231156</div>
Junio C Hamano9d971152012-12-19 00:43:111157</div>
1158<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311159<h2 id="_submodules">Submodules</h2>
Junio C Hamano3b178be2007-08-16 04:59:271160<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591161<div class="paragraph"><p>If the patch contains any changes to submodules then <em>git apply</em>
Junio C Hamanoba4b9282008-07-06 05:20:311162treats these changes as follows.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111163<div class="paragraph"><p>If <code>--index</code> is specified (explicitly or implicitly), then the submodule
Junio C Hamano3b178be2007-08-16 04:59:271164commits must match the index exactly for the patch to apply. If any
1165of the submodules are checked-out, then these check-outs are completely
1166ignored, i.e., they are not required to be up-to-date or clean and they
Junio C Hamanoba4b9282008-07-06 05:20:311167are not updated.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111168<div class="paragraph"><p>If <code>--index</code> is not specified, then the submodule commits in the patch
Junio C Hamano7924d5e2009-03-03 08:28:481169are ignored and only the absence or presence of the corresponding
Junio C Hamanoba4b9282008-07-06 05:20:311170subdirectory is checked and (if possible) updated.</p></div>
Junio C Hamano3b178be2007-08-16 04:59:271171</div>
Junio C Hamano9d971152012-12-19 00:43:111172</div>
1173<div class="sect1">
Junio C Hamanoe85e36f2010-08-10 05:30:141174<h2 id="_see_also">SEE ALSO</h2>
1175<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231176<div class="paragraph"><p><a href="git-am.html">git-am(1)</a>.</p></div>
Junio C Hamanoe85e36f2010-08-10 05:30:141177</div>
Junio C Hamano9d971152012-12-19 00:43:111178</div>
1179<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311180<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231181<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231182<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231183</div>
Junio C Hamano7bd050f2011-09-22 06:32:221184</div>
Junio C Hamano9d971152012-12-19 00:43:111185</div>
Junio C Hamano7bd050f2011-09-22 06:32:221186<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:231187<div id="footer">
1188<div id="footer-text">
Junio C Hamano076ffcc2013-02-06 05:13:211189Last updated 2013-02-05 21:07:26 PST
Junio C Hamano1a4e8412005-12-27 08:17:231190</div>
1191</div>
1192</body>
1193</html>