From a624a0607d2dca75f38201405530c1856a2d64aa Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 21 Oct 2011 23:27:37 -0500 Subject: [PATCH] Handle the branch..rebase value 'interactive' Signed-off-by: Johannes Schindelin --- Documentation/config.txt | 1 + git-pull.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 75d4712dec..1253ffd691 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -779,6 +779,7 @@ branch..rebase:: instead of merging the default branch from the default remote when "git pull" is run. See "pull.rebase" for doing this in a non branch-specific manner. + When the value is `interactive`, the rebase is run in interactive mode. + *NOTE*: this is a possibly dangerous operation; do *not* use it unless you understand the implications (see linkgit:git-rebase[1] diff --git a/git-pull.sh b/git-pull.sh index 45b7a088db..ea98413c51 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -44,7 +44,15 @@ merge_args= edit= curr_branch=$(git symbolic-ref -q HEAD) curr_branch_short="${curr_branch#refs/heads/}" rebase_options= -rebase=$(git config --bool branch.$curr_branch_short.rebase) +case "$(git config branch.$curr_branch_short.rebase)" in +interactive) + rebase_options=-i + rebase=true + ;; +*) + rebase=$(git config --bool branch.$curr_branch_short.rebase) + ;; +esac if test -z "$rebase" then rebase=$(git config --bool pull.rebase)