mirror of
https://github.com/git/git.git
synced 2025-12-23 12:14:22 +01:00
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>
This commit is contained in:
@@ -8,7 +8,7 @@ git-apply - Apply patch on a git index file and a work tree
|
|||||||
|
|
||||||
SYNOPSIS
|
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
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
@@ -72,6 +72,12 @@ OPTIONS
|
|||||||
patch. Give this flag after those flags to also apply
|
patch. Give this flag after those flags to also apply
|
||||||
the patch.
|
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
|
Author
|
||||||
------
|
------
|
||||||
|
|||||||
2
apply.c
2
apply.c
@@ -27,7 +27,7 @@ static int no_add = 0;
|
|||||||
static int show_index_info = 0;
|
static int show_index_info = 0;
|
||||||
static int line_termination = '\n';
|
static int line_termination = '\n';
|
||||||
static const char apply_usage[] =
|
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
|
* For "diff-stat" like behaviour, we keep track of the biggest change
|
||||||
|
|||||||
Reference in New Issue
Block a user