summaryrefslogtreecommitdiff
path: root/Documentation/git-apply.txt
diff options
context:
space:
mode:
authorBjörn Gustavsson <bgustavsson@gmail.com>2009-11-22 19:43:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-22 20:08:04 (GMT)
commit38a39647b43ea57c96bd6e4a351d0d5353c805bb (patch)
treeee76a9e8a2499e4190ba54685978efc5058c9b4a /Documentation/git-apply.txt
parent64485b4aba98b39f2cf4528aed95b6ddca62f332 (diff)
downloadgit-38a39647b43ea57c96bd6e4a351d0d5353c805bb.zip
git-38a39647b43ea57c96bd6e4a351d0d5353c805bb.tar.gz
git-38a39647b43ea57c96bd6e4a351d0d5353c805bb.tar.bz2
apply: apply works outside a repository
The documentation for 'git apply' talks about applying a patch/diff to the index and to the working tree, which seems to imply that it will not work outside a git repository. Actually 'git patch' works outside a repository (which can be useful especially for applying binary or rename patches that the standard "patch" utility cannot handle), so the documentation should mention it. Thanks to Junio for suggesting better wording. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r--Documentation/git-apply.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 0156ca9..0c55ca9 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -3,7 +3,7 @@ git-apply(1)
NAME
----
-git-apply - Apply a patch on a git index file and/or a working tree
+git-apply - Apply a patch to files and/or to the index
SYNOPSIS
@@ -20,8 +20,11 @@ SYNOPSIS
DESCRIPTION
-----------
-Reads supplied 'diff' output and applies it on a git index file
-and a work tree.
+Reads the supplied diff output (i.e. "a patch") and applies it to files.
+With the `--index` option the patch is also applied to the index, and
+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.
OPTIONS
-------