Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 2/4] apply: apply works outside a repository

From: Björn Gustavsson <hidden>
Date: 2016-06-15 22:47:45
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

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.

Signed-off-by: Björn Gustavsson <redacted>
---
 Documentation/git-apply.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 4f791ee..6857a68 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -23,6 +23,10 @@ DESCRIPTION
 Reads supplied 'diff' output and applies it on a git index file
 and a work tree.
 
+'git-apply' can also be used outside a git repository as long
+as no options that require a git repository are given
+(e.g. `--index` or `--cached`).
+
 OPTIONS
 -------
 <patch>...::
-- 
1.6.5.3.298.g39add
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help