From: Junio C Hamano Date: Thu, 10 Nov 2005 04:53:54 +0000 (-0800) Subject: Documentation: git-apply --no-add X-Git-Tag: v0.99.9h^2~12 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e433705dd4dc52c45e5d82b615f07b5a4b27f185;p=git.git 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 --- diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index eb8f90683..6702a18c7 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] [...] +'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [-z] [...] 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 472bcdc36..34181188b 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] ..."; +"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [-z] ..."; /* * For "diff-stat" like behaviour, we keep track of the biggest change