Handle the branch.<name>.rebase value 'interactive'

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2011-10-21 23:27:37 -05:00
parent fff9b51152
commit 3608d4fbf9
2 changed files with 10 additions and 1 deletions

View File

@@ -684,6 +684,7 @@ branch.<name>.rebase::
When true, rebase the branch <name> on top of the fetched branch,
instead of merging the default branch from the default remote when
"git pull" is run.
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]
for details).

View File

@@ -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
dry_run=
while :
do