summaryrefslogtreecommitdiff
path: root/Documentation/git-apply.txt
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-26 12:08:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-29 03:42:30 (GMT)
commitcff5dc09ed0d07461bf77e9abef57dc86a11ab77 (patch)
treef72684761303670cba7ad8a2d6178254ed5ef3e9 /Documentation/git-apply.txt
parent8fc8f05cef9b5a60cc7adbd5cd6ed130a89ca4e1 (diff)
downloadgit-cff5dc09ed0d07461bf77e9abef57dc86a11ab77.zip
git-cff5dc09ed0d07461bf77e9abef57dc86a11ab77.tar.gz
git-cff5dc09ed0d07461bf77e9abef57dc86a11ab77.tar.bz2
apply: add --intent-to-add
Similar to 'git reset -N', this option makes 'git apply' automatically mark new files as intent-to-add so they are visible in the following 'git diff' command and could also be committed with 'git commit -a'. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r--Documentation/git-apply.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 4ebc3d3..e3b966c 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -9,7 +9,7 @@ git-apply - Apply a patch to files and/or to the index
SYNOPSIS
--------
[verse]
-'git apply' [--stat] [--numstat] [--summary] [--check] [--index] [--3way]
+'git apply' [--stat] [--numstat] [--summary] [--check] [--index | --intent-to-add] [--3way]
[--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse]
[--allow-binary-replacement | --binary] [--reject] [-z]
[-p<n>] [-C<n>] [--inaccurate-eof] [--recount] [--cached]
@@ -74,6 +74,14 @@ OPTIONS
cached data, apply the patch, and store the result in the index
without using the working tree. This implies `--index`.
+--intent-to-add::
+ When applying the patch only to the working tree, mark new
+ files to be added to the index later (see `--intent-to-add`
+ option in linkgit:git-add[1]). This option is ignored unless
+ running in a Git repository and `--index` is not specified.
+ Note that `--index` could be implied by other options such
+ as `--cached` or `--3way`.
+
-3::
--3way::
When the patch does not apply cleanly, fall back on 3-way merge if