Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 7.0.2" /> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
| 19 | a { color: blue; } |
| 20 | a:visited { color: fuchsia; } |
| 21 | |
| 22 | em { |
| 23 | font-style: italic; |
| 24 | } |
| 25 | |
| 26 | strong { |
| 27 | font-weight: bold; |
| 28 | } |
| 29 | |
| 30 | tt { |
| 31 | color: navy; |
| 32 | } |
| 33 | |
| 34 | h1, h2, h3, h4, h5, h6 { |
| 35 | color: #527bbd; |
| 36 | font-family: sans-serif; |
| 37 | margin-top: 1.2em; |
| 38 | margin-bottom: 0.5em; |
| 39 | line-height: 1.3; |
| 40 | } |
| 41 | |
| 42 | h1 { |
| 43 | border-bottom: 2px solid silver; |
| 44 | } |
| 45 | h2 { |
| 46 | border-bottom: 2px solid silver; |
| 47 | padding-top: 0.5em; |
| 48 | } |
| 49 | |
| 50 | div.sectionbody { |
| 51 | font-family: serif; |
| 52 | margin-left: 0; |
| 53 | } |
| 54 | |
| 55 | hr { |
| 56 | border: 1px solid silver; |
| 57 | } |
| 58 | |
| 59 | p { |
| 60 | margin-top: 0.5em; |
| 61 | margin-bottom: 0.5em; |
| 62 | } |
| 63 | |
| 64 | pre { |
| 65 | padding: 0; |
| 66 | margin: 0; |
| 67 | } |
| 68 | |
| 69 | span#author { |
| 70 | color: #527bbd; |
| 71 | font-family: sans-serif; |
| 72 | font-weight: bold; |
| 73 | font-size: 1.2em; |
| 74 | } |
| 75 | span#email { |
| 76 | } |
| 77 | span#revision { |
| 78 | font-family: sans-serif; |
| 79 | } |
| 80 | |
| 81 | div#footer { |
| 82 | font-family: sans-serif; |
| 83 | font-size: small; |
| 84 | border-top: 2px solid silver; |
| 85 | padding-top: 0.5em; |
| 86 | margin-top: 4.0em; |
| 87 | } |
| 88 | div#footer-text { |
| 89 | float: left; |
| 90 | padding-bottom: 0.5em; |
| 91 | } |
| 92 | div#footer-badges { |
| 93 | float: right; |
| 94 | padding-bottom: 0.5em; |
| 95 | } |
| 96 | |
| 97 | div#preamble, |
| 98 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 99 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 100 | div.admonitionblock { |
| 101 | margin-right: 10%; |
| 102 | margin-top: 1.5em; |
| 103 | margin-bottom: 1.5em; |
| 104 | } |
| 105 | div.admonitionblock { |
| 106 | margin-top: 2.5em; |
| 107 | margin-bottom: 2.5em; |
| 108 | } |
| 109 | |
| 110 | div.content { /* Block element content. */ |
| 111 | padding: 0; |
| 112 | } |
| 113 | |
| 114 | /* Block element titles. */ |
| 115 | div.title, caption.title { |
| 116 | font-family: sans-serif; |
| 117 | font-weight: bold; |
| 118 | text-align: left; |
| 119 | margin-top: 1.0em; |
| 120 | margin-bottom: 0.5em; |
| 121 | } |
| 122 | div.title + * { |
| 123 | margin-top: 0; |
| 124 | } |
| 125 | |
| 126 | td div.title:first-child { |
| 127 | margin-top: 0.0em; |
| 128 | } |
| 129 | div.content div.title:first-child { |
| 130 | margin-top: 0.0em; |
| 131 | } |
| 132 | div.content + div.title { |
| 133 | margin-top: 0.0em; |
| 134 | } |
| 135 | |
| 136 | div.sidebarblock > div.content { |
| 137 | background: #ffffee; |
| 138 | border: 1px solid silver; |
| 139 | padding: 0.5em; |
| 140 | } |
| 141 | |
| 142 | div.listingblock > div.content { |
| 143 | border: 1px solid silver; |
| 144 | background: #f4f4f4; |
| 145 | padding: 0.5em; |
| 146 | } |
| 147 | |
| 148 | div.quoteblock > div.content { |
| 149 | padding-left: 2.0em; |
| 150 | } |
| 151 | div.quoteblock .attribution { |
| 152 | text-align: right; |
| 153 | } |
| 154 | |
| 155 | div.admonitionblock .icon { |
| 156 | vertical-align: top; |
| 157 | font-size: 1.1em; |
| 158 | font-weight: bold; |
| 159 | text-decoration: underline; |
| 160 | color: #527bbd; |
| 161 | padding-right: 0.5em; |
| 162 | } |
| 163 | div.admonitionblock td.content { |
| 164 | padding-left: 0.5em; |
| 165 | border-left: 2px solid silver; |
| 166 | } |
| 167 | |
| 168 | div.exampleblock > div.content { |
| 169 | border-left: 2px solid silver; |
| 170 | padding: 0.5em; |
| 171 | } |
| 172 | |
| 173 | div.verseblock div.content { |
| 174 | white-space: pre; |
| 175 | } |
| 176 | |
| 177 | div.imageblock div.content { padding-left: 0; } |
| 178 | div.imageblock img { border: 1px solid silver; } |
| 179 | span.image img { border-style: none; } |
| 180 | |
| 181 | dl { |
| 182 | margin-top: 0.8em; |
| 183 | margin-bottom: 0.8em; |
| 184 | } |
| 185 | dt { |
| 186 | margin-top: 0.5em; |
| 187 | margin-bottom: 0; |
| 188 | font-style: italic; |
| 189 | } |
| 190 | dd > *:first-child { |
| 191 | margin-top: 0; |
| 192 | } |
| 193 | |
| 194 | ul, ol { |
| 195 | list-style-position: outside; |
| 196 | } |
| 197 | ol.olist2 { |
| 198 | list-style-type: lower-alpha; |
| 199 | } |
| 200 | |
| 201 | div.tableblock > table { |
| 202 | border-color: #527bbd; |
| 203 | border-width: 3px; |
| 204 | } |
| 205 | thead { |
| 206 | font-family: sans-serif; |
| 207 | font-weight: bold; |
| 208 | } |
| 209 | tfoot { |
| 210 | font-weight: bold; |
| 211 | } |
| 212 | |
| 213 | div.hlist { |
| 214 | margin-top: 0.8em; |
| 215 | margin-bottom: 0.8em; |
| 216 | } |
| 217 | td.hlist1 { |
| 218 | vertical-align: top; |
| 219 | font-style: italic; |
| 220 | padding-right: 0.8em; |
| 221 | } |
| 222 | td.hlist2 { |
| 223 | vertical-align: top; |
| 224 | } |
| 225 | |
| 226 | @media print { |
| 227 | div#footer-badges { display: none; } |
| 228 | } |
| 229 | include::./stylesheets/xhtml11-manpage.css[] |
| 230 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 231 | |
| 232 | div.sidebar-content { |
| 233 | background: #ffffee; |
| 234 | border: 1px solid silver; |
| 235 | padding: 0.5em; |
| 236 | } |
| 237 | div.sidebar-title, div.image-title { |
| 238 | font-family: sans-serif; |
| 239 | font-weight: bold; |
| 240 | margin-top: 0.0em; |
| 241 | margin-bottom: 0.5em; |
| 242 | } |
| 243 | |
| 244 | div.listingblock div.content { |
| 245 | border: 1px solid silver; |
| 246 | background: #f4f4f4; |
| 247 | padding: 0.5em; |
| 248 | } |
| 249 | |
| 250 | div.quoteblock-content { |
| 251 | padding-left: 2.0em; |
| 252 | } |
| 253 | |
| 254 | div.exampleblock-content { |
| 255 | border-left: 2px solid silver; |
| 256 | padding-left: 0.5em; |
| 257 | } |
| 258 | </style> |
| 259 | <title>git-apply(1)</title> |
| 260 | </head> |
| 261 | <body> |
| 262 | <div id="header"> |
| 263 | <h1> |
| 264 | git-apply(1) Manual Page |
| 265 | </h1> |
| 266 | <h2>NAME</h2> |
| 267 | <div class="sectionbody"> |
| 268 | <p>git-apply - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 269 | Apply a patch on a git index file and a working tree |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 270 | </p> |
| 271 | </div> |
| 272 | </div> |
| 273 | <h2>SYNOPSIS</h2> |
| 274 | <div class="sectionbody"> |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 275 | <div class="verseblock"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 276 | <div class="content"><em>git-apply</em> [--stat] [--numstat] [--summary] [--check] [--index] |
Junio C Hamano | 01d8f83 | 2007-09-24 07:37:30 | [diff] [blame] | 277 | [--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse] |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 278 | [--allow-binary-replacement | --binary] [--reject] [-z] |
| 279 | [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] |
Junio C Hamano | 942b35e | 2007-12-09 10:19:33 | [diff] [blame] | 280 | [--whitespace=<nowarn|warn|fix|error|error-all>] |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 281 | [--exclude=PATH] [--verbose] [<patch>…]</div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 282 | </div> |
| 283 | <h2>DESCRIPTION</h2> |
| 284 | <div class="sectionbody"> |
| 285 | <p>Reads supplied diff output and applies it on a git index file |
| 286 | and a work tree.</p> |
| 287 | </div> |
| 288 | <h2>OPTIONS</h2> |
| 289 | <div class="sectionbody"> |
| 290 | <dl> |
| 291 | <dt> |
| 292 | <patch>… |
| 293 | </dt> |
| 294 | <dd> |
| 295 | <p> |
| 296 | The files to read patch from. <em>-</em> can be used to read |
| 297 | from the standard input. |
| 298 | </p> |
| 299 | </dd> |
| 300 | <dt> |
| 301 | --stat |
| 302 | </dt> |
| 303 | <dd> |
| 304 | <p> |
| 305 | Instead of applying the patch, output diffstat for the |
| 306 | input. Turns off "apply". |
| 307 | </p> |
| 308 | </dd> |
| 309 | <dt> |
| 310 | --numstat |
| 311 | </dt> |
| 312 | <dd> |
| 313 | <p> |
| 314 | Similar to --stat, but shows number of added and |
| 315 | deleted lines in decimal notation and pathname without |
Junio C Hamano | d793de5 | 2006-12-26 09:11:43 | [diff] [blame] | 316 | abbreviation, to make it more machine friendly. For |
| 317 | binary files, outputs two <tt>-</tt> instead of saying |
| 318 | <tt>0 0</tt>. Turns off "apply". |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 319 | </p> |
| 320 | </dd> |
| 321 | <dt> |
| 322 | --summary |
| 323 | </dt> |
| 324 | <dd> |
| 325 | <p> |
| 326 | Instead of applying the patch, output a condensed |
| 327 | summary of information obtained from git diff extended |
| 328 | headers, such as creations, renames and mode changes. |
| 329 | Turns off "apply". |
| 330 | </p> |
| 331 | </dd> |
| 332 | <dt> |
| 333 | --check |
| 334 | </dt> |
| 335 | <dd> |
| 336 | <p> |
| 337 | Instead of applying the patch, see if the patch is |
| 338 | applicable to the current work tree and/or the index |
| 339 | file and detects errors. Turns off "apply". |
| 340 | </p> |
| 341 | </dd> |
| 342 | <dt> |
| 343 | --index |
| 344 | </dt> |
| 345 | <dd> |
| 346 | <p> |
| 347 | When --check is in effect, or when applying the patch |
| 348 | (which is the default when none of the options that |
| 349 | disables it is in effect), make sure the patch is |
| 350 | applicable to what the current index file records. If |
| 351 | the file to be patched in the work tree is not |
| 352 | up-to-date, it is flagged as an error. This flag also |
| 353 | causes the index file to be updated. |
| 354 | </p> |
| 355 | </dd> |
| 356 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 357 | --cached |
| 358 | </dt> |
| 359 | <dd> |
| 360 | <p> |
| 361 | Apply a patch without touching the working tree. Instead, take the |
| 362 | cached data, apply the patch, and store the result in the index, |
| 363 | without using the working tree. This implies <em>--index</em>. |
| 364 | </p> |
| 365 | </dd> |
| 366 | <dt> |
Junio C Hamano | 01d8f83 | 2007-09-24 07:37:30 | [diff] [blame] | 367 | --build-fake-ancestor <file> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 368 | </dt> |
| 369 | <dd> |
| 370 | <p> |
| 371 | Newer git-diff output has embedded <em>index information</em> |
| 372 | for each blob to help identify the original version that |
| 373 | the patch applies to. When this flag is given, and if |
Junio C Hamano | 01d8f83 | 2007-09-24 07:37:30 | [diff] [blame] | 374 | the original versions of the blobs is available locally, |
| 375 | builds a temporary index containing those blobs. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 376 | </p> |
Junio C Hamano | 01d8f83 | 2007-09-24 07:37:30 | [diff] [blame] | 377 | <p>When a pure mode change is encountered (which has no index information), |
| 378 | the information is read from the current index instead.</p> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 379 | </dd> |
| 380 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 381 | -R, --reverse |
| 382 | </dt> |
| 383 | <dd> |
| 384 | <p> |
| 385 | Apply the patch in reverse. |
| 386 | </p> |
| 387 | </dd> |
| 388 | <dt> |
| 389 | --reject |
| 390 | </dt> |
| 391 | <dd> |
| 392 | <p> |
| 393 | For atomicity, <a href="git-apply.html">git-apply(1)</a> by default fails the whole patch and |
| 394 | does not touch the working tree when some of the hunks |
| 395 | do not apply. This option makes it apply |
Junio C Hamano | 9adfc6a | 2006-08-28 07:18:38 | [diff] [blame] | 396 | the parts of the patch that are applicable, and leave the |
| 397 | rejected hunks in corresponding *.rej files. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 398 | </p> |
| 399 | </dd> |
| 400 | <dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 401 | -z |
| 402 | </dt> |
| 403 | <dd> |
| 404 | <p> |
| 405 | When showing the index information, do not munge paths, |
| 406 | but use NUL terminated machine readable format. Without |
| 407 | this flag, the pathnames output will have TAB, LF, and |
| 408 | backslash characters replaced with <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>, |
| 409 | respectively. |
| 410 | </p> |
| 411 | </dd> |
| 412 | <dt> |
Junio C Hamano | 8af15b0 | 2006-02-01 00:59:26 | [diff] [blame] | 413 | -p<n> |
| 414 | </dt> |
| 415 | <dd> |
| 416 | <p> |
| 417 | Remove <n> leading slashes from traditional diff paths. The |
| 418 | default is 1. |
| 419 | </p> |
| 420 | </dd> |
| 421 | <dt> |
Junio C Hamano | 54559c8 | 2006-04-13 07:45:12 | [diff] [blame] | 422 | -C<n> |
| 423 | </dt> |
| 424 | <dd> |
| 425 | <p> |
| 426 | Ensure at least <n> lines of surrounding context match before |
| 427 | and after each change. When fewer lines of surrounding |
Junio C Hamano | 33db437 | 2006-06-07 19:51:45 | [diff] [blame] | 428 | context exist they all must match. By default no context is |
Junio C Hamano | 54559c8 | 2006-04-13 07:45:12 | [diff] [blame] | 429 | ever ignored. |
| 430 | </p> |
| 431 | </dd> |
| 432 | <dt> |
Junio C Hamano | 3eb513f | 2006-09-18 02:47:16 | [diff] [blame] | 433 | --unidiff-zero |
| 434 | </dt> |
| 435 | <dd> |
| 436 | <p> |
| 437 | By default, <a href="git-apply.html">git-apply(1)</a> expects that the patch being |
| 438 | applied is a unified diff with at least one line of context. |
| 439 | This provides good safety measures, but breaks down when |
| 440 | applying a diff generated with --unified=0. To bypass these |
| 441 | checks use <em>--unidiff-zero</em>. |
| 442 | </p> |
| 443 | <p>Note, for the reasons stated above usage of context-free patches are |
| 444 | discouraged.</p> |
| 445 | </dd> |
| 446 | <dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 447 | --apply |
| 448 | </dt> |
| 449 | <dd> |
| 450 | <p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 451 | If you use any of the options marked "Turns off |
| 452 | <em>apply</em>" above, <a href="git-apply.html">git-apply(1)</a> reads and outputs the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 453 | information you asked without actually applying the |
| 454 | patch. Give this flag after those flags to also apply |
| 455 | the patch. |
| 456 | </p> |
| 457 | </dd> |
| 458 | <dt> |
| 459 | --no-add |
| 460 | </dt> |
| 461 | <dd> |
| 462 | <p> |
| 463 | When applying a patch, ignore additions made by the |
Junio C Hamano | 3a70234 | 2007-12-12 21:34:02 | [diff] [blame] | 464 | patch. This can be used to extract the common part between |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 465 | two files by first running <tt>diff</tt> on them and applying |
| 466 | the result with this option, which would apply the |
| 467 | deletion part but not addition part. |
| 468 | </p> |
| 469 | </dd> |
| 470 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 471 | --allow-binary-replacement, --binary |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 472 | </dt> |
| 473 | <dd> |
| 474 | <p> |
Junio C Hamano | fd73d89 | 2006-09-14 07:38:22 | [diff] [blame] | 475 | Historically we did not allow binary patch applied |
| 476 | without an explicit permission from the user, and this |
| 477 | flag was the way to do so. Currently we always allow binary |
| 478 | patch application, so this is a no-op. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 479 | </p> |
| 480 | </dd> |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 481 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 482 | --exclude=<path-pattern> |
| 483 | </dt> |
| 484 | <dd> |
| 485 | <p> |
| 486 | Don't apply changes to files matching the given path pattern. This can |
| 487 | be useful when importing patchsets, where you want to exclude certain |
| 488 | files or directories. |
| 489 | </p> |
| 490 | </dd> |
| 491 | <dt> |
Junio C Hamano | 942b35e | 2007-12-09 10:19:33 | [diff] [blame] | 492 | --whitespace=<action> |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 493 | </dt> |
| 494 | <dd> |
| 495 | <p> |
Junio C Hamano | 942b35e | 2007-12-09 10:19:33 | [diff] [blame] | 496 | When applying a patch, detect a new or modified line that has |
| 497 | whitespace errors. What are considered whitespace errors is |
| 498 | controlled by <tt>core.whitespace</tt> configuration. By default, |
| 499 | trailing whitespaces (including lines that solely consist of |
| 500 | whitespaces) and a space character that is immediately followed |
| 501 | by a tab character inside the initial indent of the line are |
| 502 | considered whitespace errors. |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 503 | </p> |
Junio C Hamano | 942b35e | 2007-12-09 10:19:33 | [diff] [blame] | 504 | <p>By default, the command outputs warning messages but applies the patch. |
| 505 | When <a href="git-apply.html">git-apply(1)</a> is used for statistics and not applying a |
| 506 | patch, it defaults to <tt>nowarn</tt>.</p> |
| 507 | <p>You can use different <tt><action></tt> to control this |
| 508 | behavior:</p> |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 509 | <ul> |
| 510 | <li> |
| 511 | <p> |
| 512 | <tt>nowarn</tt> turns off the trailing whitespace warning. |
| 513 | </p> |
| 514 | </li> |
| 515 | <li> |
| 516 | <p> |
| 517 | <tt>warn</tt> outputs warnings for a few such errors, but applies the |
Junio C Hamano | 942b35e | 2007-12-09 10:19:33 | [diff] [blame] | 518 | patch as-is (default). |
| 519 | </p> |
| 520 | </li> |
| 521 | <li> |
| 522 | <p> |
| 523 | <tt>fix</tt> outputs warnings for a few such errors, and applies the |
| 524 | patch after fixing them (<tt>strip</tt> is a synonym --- the tool |
| 525 | used to consider only trailing whitespaces as errors, and the |
| 526 | fix involved <em>stripping</em> them, but modern gits do more). |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 527 | </p> |
| 528 | </li> |
| 529 | <li> |
| 530 | <p> |
| 531 | <tt>error</tt> outputs warnings for a few such errors, and refuses |
| 532 | to apply the patch. |
| 533 | </p> |
| 534 | </li> |
| 535 | <li> |
| 536 | <p> |
| 537 | <tt>error-all</tt> is similar to <tt>error</tt> but shows all errors. |
| 538 | </p> |
| 539 | </li> |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 540 | </ul> |
| 541 | </dd> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 542 | <dt> |
Junio C Hamano | 3a97102 | 2006-11-18 22:17:58 | [diff] [blame] | 543 | --inaccurate-eof |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 544 | </dt> |
| 545 | <dd> |
| 546 | <p> |
| 547 | Under certain circumstances, some versions of diff do not correctly |
| 548 | detect a missing new-line at the end of the file. As a result, patches |
| 549 | created by such diff programs do not record incomplete lines |
| 550 | correctly. This option adds support for applying such patches by |
| 551 | working around this bug. |
| 552 | </p> |
| 553 | </dd> |
| 554 | <dt> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 555 | -v, --verbose |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 556 | </dt> |
| 557 | <dd> |
| 558 | <p> |
| 559 | Report progress to stderr. By default, only a message about the |
| 560 | current patch being applied will be printed. This option will cause |
| 561 | additional information to be reported. |
| 562 | </p> |
| 563 | </dd> |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 564 | </dl> |
| 565 | </div> |
| 566 | <h2>Configuration</h2> |
| 567 | <div class="sectionbody"> |
| 568 | <dl> |
| 569 | <dt> |
| 570 | apply.whitespace |
| 571 | </dt> |
| 572 | <dd> |
| 573 | <p> |
| 574 | When no <tt>--whitespace</tt> flag is given from the command |
| 575 | line, this configuration item is used as the default. |
| 576 | </p> |
| 577 | </dd> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 578 | </dl> |
| 579 | </div> |
Junio C Hamano | 3b178be | 2007-08-16 04:59:27 | [diff] [blame] | 580 | <h2>Submodules</h2> |
| 581 | <div class="sectionbody"> |
| 582 | <p>If the patch contains any changes to submodules then <a href="git-apply.html">git-apply(1)</a> |
| 583 | treats these changes as follows.</p> |
| 584 | <p>If --index is specified (explicitly or implicitly), then the submodule |
| 585 | commits must match the index exactly for the patch to apply. If any |
| 586 | of the submodules are checked-out, then these check-outs are completely |
| 587 | ignored, i.e., they are not required to be up-to-date or clean and they |
| 588 | are not updated.</p> |
| 589 | <p>If --index is not specified, then the submodule commits in the patch |
| 590 | are ignored and only the absence of presence of the corresponding |
| 591 | subdirectory is checked and (if possible) updated.</p> |
| 592 | </div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 593 | <h2>Author</h2> |
| 594 | <div class="sectionbody"> |
| 595 | <p>Written by Linus Torvalds <torvalds@osdl.org></p> |
| 596 | </div> |
| 597 | <h2>Documentation</h2> |
| 598 | <div class="sectionbody"> |
| 599 | <p>Documentation by Junio C Hamano</p> |
| 600 | </div> |
| 601 | <h2>GIT</h2> |
| 602 | <div class="sectionbody"> |
| 603 | <p>Part of the <a href="git.html">git(7)</a> suite</p> |
| 604 | </div> |
| 605 | <div id="footer"> |
| 606 | <div id="footer-text"> |
Junio C Hamano | 35738e8 | 2008-01-07 07:55:46 | [diff] [blame] | 607 | Last updated 07-Jan-2008 07:50:01 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 608 | </div> |
| 609 | </div> |
| 610 | </body> |
| 611 | </html> |