path: root/Documentation/git-apply.txt
diff options
authorJohannes Schindelin <>2008-06-27 17:43:09 (GMT)
committerJunio C Hamano <>2008-06-28 08:19:42 (GMT)
commitc14b9d1e330a7f68ffd0ad7e22d6148c6097c122 (patch)
tree2d25c5e478182d4677e6f21f5592a425f138858d /Documentation/git-apply.txt
parentd54467b8c319571b5dc433b1f7e471c4b0f21caf (diff)
Allow git-apply to recount the lines in a hunk (AKA recountdiff)
Sometimes, the easiest way to fix up a patch is to edit it directly, even adding or deleting lines. Now, many people are not as divine as certain benevolent dictators as to update the hunk headers correctly at the first try. So teach the tool to do it for us. [jc: with tests] Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-apply.txt')
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index c834763..c5ee636 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -12,7 +12,7 @@ SYNOPSIS
'git-apply' [--stat] [--numstat] [--summary] [--check] [--index]
[--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse]
[--allow-binary-replacement | --binary] [--reject] [-z]
- [-pNUM] [-CNUM] [--inaccurate-eof] [--cached]
+ [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
[--exclude=PATH] [--verbose] [<patch>...]
@@ -177,6 +177,11 @@ behavior:
current patch being applied will be printed. This option will cause
additional information to be reported.
+ Do not trust the line counts in the hunk headers, but infer them
+ by inspecting the patch (e.g. after editing the patch without
+ adjusting the hunk headers appropriately).