Skip to content

Commit 1393f56

Browse files
committed
Merge branch 'rp/apply-cached-doc'
The description of --cached/--index options in "git apply --help" has been updated. * rp/apply-cached-doc: git-apply.txt: update descriptions of --cached, --index
2 parents c57afd7 + d064702 commit 1393f56

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Documentation/git-apply.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ OPTIONS
6161
file and detects errors. Turns off "apply".
6262

6363
--index::
64-
When `--check` is in effect, or when applying the patch
65-
(which is the default when none of the options that
66-
disables it is in effect), make sure the patch is
67-
applicable to what the current index file records. If
68-
the file to be patched in the working tree is not
69-
up to date, it is flagged as an error. This flag also
70-
causes the index file to be updated.
64+
Apply the patch to both the index and the working tree (or
65+
merely check that it would apply cleanly to both if `--check` is
66+
in effect). Note that `--index` expects index entries and
67+
working tree copies for relevant paths to be identical (their
68+
contents and metadata such as file mode must match), and will
69+
raise an error if they are not, even if the patch would apply
70+
cleanly to both the index and the working tree in isolation.
7171

7272
--cached::
73-
Apply a patch without touching the working tree. Instead take the
74-
cached data, apply the patch, and store the result in the index
75-
without using the working tree. This implies `--index`.
73+
Apply the patch to just the index, without touching the working
74+
tree. If `--check` is in effect, merely check that it would
75+
apply cleanly to the index entry.
7676

7777
--intent-to-add::
7878
When applying the patch only to the working tree, mark new

0 commit comments

Comments
 (0)