Documentation: git-apply --no-add
This is a specialized hack to help no-base merges, but other people might find it useful, so let's document it. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 9, 2005 at 20:53 UTC
e433705dd4dc52c45e5d82b615f07b5a4b27f185
2 files changed
+8
-2
Documentation/git-apply.txt
+7
-1
@@ -8,7 +8,7 @@ git-apply - Apply patch on a git index file and a work tree
8
9
SYNOPSIS
10
--------
11
-'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--index-info] [-z] [<patch>...]
11
+'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [-z] [<patch>...]
12
13
DESCRIPTION
14
-----------
@@ -72,6 +72,12 @@ OPTIONS
72
patch. Give this flag after those flags to also apply
73
the patch.
74
75
+--no-add::
76
+ When applying a patch, ignore additions made by the
77
+ patch. This can be used to extract common part between
78
+ two files by first running `diff` on them and applying
79
+ the result with this option, which would apply the
80
+ deletion part but not addition part.
81
82
Author
83
------
apply.c
+1
-1
@@ -27,7 +27,7 @@ static int no_add = 0;
27
static int show_index_info = 0;
28
static int line_termination = '\n';
29
static const char apply_usage[] =
30
-"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--index-info] [-z] <patch>...";
30
+"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [-z] <patch>...";
31
32
/*
33
* For "diff-stat" like behaviour, we keep track of the biggest change