From c14b9d1e330a7f68ffd0ad7e22d6148c6097c122 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 27 Jun 2008 18:43:09 +0100 Subject: 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 --- Documentation/git-apply.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Documentation/git-apply.txt') diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index c8347637d..c5ee636fa 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 ] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] - [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] + [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached] [--whitespace=] [--exclude=PATH] [--verbose] [...] @@ -177,6 +177,11 @@ behavior: current patch being applied will be printed. This option will cause additional information to be reported. +--recount:: + 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). + Configuration ------------- -- cgit v1.2.1