From 67dad687ad15d26d8e26f4d27874af0bc0965ce2 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Thu, 8 Feb 2007 15:57:08 +0200 Subject: [PATCH] add -C[NUM] to git-am Add -C[NUM] to git-am and git-rebase so that patches can be applied even if context has changed a bit. Signed-off-by: Michael S. Tsirkin Signed-off-by: Junio C Hamano --- Documentation/git-am.txt | 4 ++++ Documentation/git-rebase.txt | 8 +++++++- git-am.sh | 12 ++++++++---- git-rebase.sh | 7 ++++++- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index aa4ce1ddb0..f7d551e2c7 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -64,6 +64,10 @@ default. You could use `--no-utf8` to override this. This flag is passed to the `git-apply` program that applies the patch. +-C:: + This flag is passed to the `git-apply` program that applies + the patch. + --interactive:: Run interactively, just like git-applymbox. diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 977f661b9d..3dff2dfae7 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -7,7 +7,7 @@ git-rebase - Forward-port local commits to the updated upstream head SYNOPSIS -------- -'git-rebase' [-v] [--merge] [--onto ] [] +'git-rebase' [-v] [--merge] [-CNUM] [--onto ] [] 'git-rebase' --continue | --skip | --abort @@ -196,6 +196,12 @@ OPTIONS -v, \--verbose:: Display a diffstat of what changed upstream since the last rebase. +-C:: + Ensure at least lines of surrounding context match before + and after each change. When fewer lines of surrounding + context exist they all must match. By default no context is + ever ignored. + include::merge-strategies.txt[] NOTES diff --git a/git-am.sh b/git-am.sh index 1252f26bbd..9a6123437e 100755 --- a/git-am.sh +++ b/git-am.sh @@ -3,7 +3,7 @@ # Copyright (c) 2005, 2006 Junio C Hamano USAGE='[--signoff] [--dotest=] [--utf8 | --no-utf8] [--binary] [--3way] - [--interactive] [--whitespace=