Skip to content

Commit 3608d4f

Browse files
committed
Handle the branch.<name>.rebase value 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent fff9b51 commit 3608d4f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Documentation/config.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ branch.<name>.rebase::
684684
When true, rebase the branch <name> on top of the fetched branch,
685685
instead of merging the default branch from the default remote when
686686
"git pull" is run.
687+
When the value is `interactive`, the rebase is run in interactive mode.
687688
*NOTE*: this is a possibly dangerous operation; do *not* use
688689
it unless you understand the implications (see linkgit:git-rebase[1]
689690
for details).

git-pull.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ merge_args=
4444
curr_branch=$(git symbolic-ref -q HEAD)
4545
curr_branch_short="${curr_branch#refs/heads/}"
4646
rebase_options=
47-
rebase=$(git config --bool branch.$curr_branch_short.rebase)
47+
case "$(git config branch.$curr_branch_short.rebase)" in
48+
interactive)
49+
rebase_options=-i
50+
rebase=true
51+
;;
52+
*)
53+
rebase=$(git config --bool branch.$curr_branch_short.rebase)
54+
;;
55+
esac
4856
dry_run=
4957
while :
5058
do

0 commit comments

Comments
 (0)