mirror of
https://github.com/git/git.git
synced 2026-02-04 06:53:10 +00:00
Teach 'git pull' to handle --rebase=interactive
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -101,7 +101,7 @@ Options related to merging
|
||||
include::merge-options.txt[]
|
||||
|
||||
-r::
|
||||
--rebase[=false|true|preserve]::
|
||||
--rebase[=false|true|preserve|interactive]::
|
||||
When true, rebase the current branch on top of the upstream
|
||||
branch after fetching. If there is a remote-tracking branch
|
||||
corresponding to the upstream branch and the upstream branch
|
||||
@@ -113,6 +113,8 @@ to `git rebase` so that locally created merge commits will not be flattened.
|
||||
+
|
||||
When false, merge the current branch into the upstream branch.
|
||||
+
|
||||
When `interactive`, enable the interactive mode of rebase.
|
||||
+
|
||||
See `pull.rebase`, `branch.<name>.rebase` and `branch.autoSetupRebase` in
|
||||
linkgit:git-config[1] if you want to make `git pull` always use
|
||||
`--rebase` instead of merging.
|
||||
|
||||
@@ -159,6 +159,7 @@ do
|
||||
;;
|
||||
--no-rebase)
|
||||
rebase=false
|
||||
|
||||
;;
|
||||
--recurse-submodules)
|
||||
recurse_submodules=--recurse-submodules
|
||||
@@ -224,6 +225,10 @@ do
|
||||
done
|
||||
|
||||
case "$rebase" in
|
||||
i|interactive)
|
||||
rebase=true
|
||||
rebase_args=-i
|
||||
;;
|
||||
preserve)
|
||||
rebase=true
|
||||
rebase_args=--preserve-merges
|
||||
@@ -231,7 +236,7 @@ preserve)
|
||||
true|false|'')
|
||||
;;
|
||||
*)
|
||||
echo "Invalid value for --rebase, should be true, false, or preserve"
|
||||
echo "Invalid value for --rebase, should be true, false, interactive or preserve"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user