From 89930a1c1aac2f4720f87fa5f537c9545bb4f176 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 c64b48743b..5a41ec9e6d 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -682,6 +682,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 50f4855117..eec078300c 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -44,7 +44,15 @@ merge_args= 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) -- 2.11.4.GIT