Skip to content

Commit

Permalink
Documentation: git-apply --no-add
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Nov 12, 2005
1 parent cb93c19 commit e433705
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Documentation/git-apply.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------
Expand Down Expand Up @@ -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
------
Expand Down
2 changes: 1 addition & 1 deletion apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e433705

Please sign in to comment.