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 816629f719
commit d48b69bc02
2 changed files with 10 additions and 1 deletions

View File

@@ -714,6 +714,7 @@ branch.<name>.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]

View File

@@ -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)