X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Documentation%2Fgit-apply.txt;h=4a74b23d403d970643fcb8e0438ab6649f54e54c;hb=452c6d506b1a6dcf24d4ceaa592afc39c1c1a60e;hp=6a07ec22a441e81142e02389cb5bb1c433ea13df;hpb=f9821e2b2139e5e2fbe9fde3df58ddc98ae4ce19;p=git.git diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 6a07ec22a..4a74b23d4 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -26,6 +26,10 @@ with the `--cache` option the patch is only applied to the index. Without these options, the command applies the patch only to files, and does not require them to be in a git repository. +This command applies the patch but does not create a commit. Use +linkgit:git-am[1] to create commits from patches generated by +linkgit:git-format-patch[1] and/or received by email. + OPTIONS ------- ...:: @@ -51,7 +55,7 @@ OPTIONS --check:: Instead of applying the patch, see if the patch is - applicable to the current work tree and/or the index + applicable to the current working tree and/or the index file and detects errors. Turns off "apply". --index:: @@ -59,7 +63,7 @@ OPTIONS (which is the default when none of the options that disables it is in effect), make sure the patch is applicable to what the current index file records. If - the file to be patched in the work tree is not + the file to be patched in the working tree is not up-to-date, it is flagged as an error. This flag also causes the index file to be updated. @@ -69,7 +73,7 @@ OPTIONS without using the working tree. This implies `--index`. --build-fake-ancestor=:: - Newer 'git-diff' output has embedded 'index information' + Newer 'git diff' output has embedded 'index information' for each blob to help identify the original version that the patch applies to. When this flag is given, and if the original versions of the blobs are available locally, @@ -83,7 +87,7 @@ the information is read from the current index instead. Apply the patch in reverse. --reject:: - For atomicity, 'git-apply' by default fails the whole patch and + For atomicity, 'git apply' by default fails the whole patch and does not touch the working tree when some of the hunks do not apply. This option makes it apply the parts of the patch that are applicable, and leave the @@ -109,7 +113,7 @@ any of those replacements occurred. ever ignored. --unidiff-zero:: - By default, 'git-apply' expects that the patch being + By default, 'git apply' expects that the patch being applied is a unified diff with at least one line of context. This provides good safety measures, but breaks down when applying a diff generated with `--unified=0`. To bypass these @@ -120,7 +124,7 @@ discouraged. --apply:: If you use any of the options marked "Turns off - 'apply'" above, 'git-apply' reads and outputs the + 'apply'" above, 'git apply' reads and outputs the requested information without actually applying the patch. Give this flag after those flags to also apply the patch. @@ -229,7 +233,7 @@ apply.whitespace:: Submodules ---------- -If the patch contains any changes to submodules then 'git-apply' +If the patch contains any changes to submodules then 'git apply' treats these changes as follows. If `--index` is specified (explicitly or implicitly), then the submodule @@ -242,6 +246,12 @@ If `--index` is not specified, then the submodule commits in the patch are ignored and only the absence or presence of the corresponding subdirectory is checked and (if possible) updated. + +SEE ALSO +-------- +linkgit:git-am[1]. + + Author ------ Written by Linus Torvalds