summaryrefslogtreecommitdiffstats
path: root/git-apply.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2009-11-24 10:54:16 +0000
committerJunio C Hamano <junio@hera.kernel.org>2009-11-24 10:54:16 +0000
commit5706e0b5cf3d63b8c655239151d8e2ab308ffa4a (patch)
tree94782861a9c88207c54278ecdff7caf59ec4f816 /git-apply.html
parent9df0c66308c7d858d04f0ac7916bc4efe87b4486 (diff)
downloadgit-htmldocs-5706e0b5cf3d63b8c655239151d8e2ab308ffa4a.tar.gz
Autogenerated HTML docs for v1.6.6-rc0-50-gaf06e
Diffstat (limited to 'git-apply.html')
-rw-r--r--git-apply.html42
1 files changed, 23 insertions, 19 deletions
diff --git a/git-apply.html b/git-apply.html
index 4742d159d..52928446d 100644
--- a/git-apply.html
+++ b/git-apply.html
@@ -314,7 +314,7 @@ git-apply(1) Manual Page
<h2>NAME</h2>
<div class="sectionbody">
<p>git-apply -
- Apply a patch on a git index file and/or a working tree
+ Apply a patch to files and/or to the index
</p>
</div>
</div>
@@ -332,8 +332,11 @@ git-apply(1) Manual Page
</div>
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
-<div class="para"><p>Reads supplied <em>diff</em> output and applies it on a git index file
-and a work tree.</p></div>
+<div class="para"><p>Reads the supplied diff output (i.e. "a patch") and applies it to files.
+With the <tt>--index</tt> option the patch is also applied to the index, and
+with the <tt>--cache</tt> 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.</p></div>
</div>
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
@@ -361,7 +364,7 @@ and a work tree.</p></div>
</dt>
<dd>
<p>
- Similar to --stat, but shows the number of added and
+ Similar to <tt>--stat</tt>, but shows the number of added and
deleted lines in decimal notation and the pathname without
abbreviation, to make it more machine friendly. For
binary files, outputs two <tt>-</tt> instead of saying
@@ -385,7 +388,7 @@ and a work tree.</p></div>
<dd>
<p>
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".
</p>
</dd>
@@ -394,11 +397,11 @@ and a work tree.</p></div>
</dt>
<dd>
<p>
- When --check is in effect, or when applying the patch
+ When <tt>--check</tt> is in effect, or when applying the patch
(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.
</p>
@@ -410,7 +413,7 @@ and a work tree.</p></div>
<p>
Apply a patch without touching the working tree. Instead take the
cached data, apply the patch, and store the result in the index
- without using the working tree. This implies <em>--index</em>.
+ without using the working tree. This implies <tt>--index</tt>.
</p>
</dd>
<dt>
@@ -455,12 +458,13 @@ the information is read from the current index instead.</p></div>
</dt>
<dd>
<p>
- When showing the index information, do not munge paths,
- but use NUL terminated machine readable format. Without
- this flag, the pathnames output will have TAB, LF, and
- backslash characters replaced with <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>,
- respectively.
+ When <tt>--numstat</tt> has been given, do not munge pathnames,
+ but use a NUL-terminated machine-readable format.
</p>
+<div class="para"><p>Without this option, each pathname output will have TAB, LF, double quotes,
+and backslash characters replaced with <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt>, and <tt>\\</tt>,
+respectively, and the pathname will be enclosed in double quotes if
+any of those replacements occurred.</p></div>
</dd>
<dt>
-p&lt;n&gt;
@@ -490,8 +494,8 @@ the information is read from the current index instead.</p></div>
By default, <em>git-apply</em> 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
- checks use <em>--unidiff-zero</em>.
+ applying a diff generated with <tt>--unified=0</tt>. To bypass these
+ checks use <tt>--unidiff-zero</tt>.
</p>
<div class="para"><p>Note, for the reasons stated above usage of context-free patches is
discouraged.</p></div>
@@ -553,7 +557,7 @@ discouraged.</p></div>
be useful when importing patchsets, where you want to include certain
files or directories.
</p>
-<div class="para"><p>When --exclude and --include patterns are used, they are examined in the
+<div class="para"><p>When <tt>--exclude</tt> and <tt>--include</tt> patterns are used, they are examined in the
order they appear on the command line, and the first match determines if a
patch to each path is used. A patch to a path that does not match any
include/exclude pattern is used by default if there is no include pattern
@@ -702,12 +706,12 @@ apply.whitespace
<div class="sectionbody">
<div class="para"><p>If the patch contains any changes to submodules then <em>git-apply</em>
treats these changes as follows.</p></div>
-<div class="para"><p>If --index is specified (explicitly or implicitly), then the submodule
+<div class="para"><p>If <tt>--index</tt> is specified (explicitly or implicitly), then the submodule
commits must match the index exactly for the patch to apply. If any
of the submodules are checked-out, then these check-outs are completely
ignored, i.e., they are not required to be up-to-date or clean and they
are not updated.</p></div>
-<div class="para"><p>If --index is not specified, then the submodule commits in the patch
+<div class="para"><p>If <tt>--index</tt> 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.</p></div>
</div>
@@ -725,7 +729,7 @@ subdirectory is checked and (if possible) updated.</p></div>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2009-11-15 09:56:59 UTC
+Last updated 2009-11-24 10:53:35 UTC
</div>
</div>
</body>