summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-apply.txt8
-rw-r--r--apply.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index eb8f906..6702a18 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -8,7 +8,7 @@ git-apply - Apply patch on a git index file and a work tree
SYNOPSIS
--------
-'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--index-info] [-z] [<patch>...]
+'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [-z] [<patch>...]
DESCRIPTION
-----------
@@ -72,6 +72,12 @@ OPTIONS
patch. Give this flag after those flags to also apply
the patch.
+--no-add::
+ When applying a patch, ignore additions made by the
+ patch. This can be used to extract common part between
+ two files by first running `diff` on them and applying
+ the result with this option, which would apply the
+ deletion part but not addition part.
Author
------
diff --git a/apply.c b/apply.c
index 472bcdc..3418118 100644
--- a/apply.c
+++ b/apply.c
@@ -27,7 +27,7 @@ static int no_add = 0;
static int show_index_info = 0;
static int line_termination = '\n';
static const char apply_usage[] =
-"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--index-info] [-z] <patch>...";
+"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [-z] <patch>...";
/*
* For "diff-stat" like behaviour, we keep track of the biggest change