Remove rebase behaviour from pull.
This commit is contained in:
parent
70ee1c5301
commit
42fc3dac9c
1 changed files with 4 additions and 5 deletions
9
magit.el
9
magit.el
|
@ -2913,17 +2913,16 @@ update it."
|
||||||
(remote (magit-run-git-async "fetch" remote))
|
(remote (magit-run-git-async "fetch" remote))
|
||||||
(t (magit-run-git-async "remote" "update"))))
|
(t (magit-run-git-async "remote" "update"))))
|
||||||
|
|
||||||
(magit-define-command pull (&optional rebase)
|
(magit-define-command pull ()
|
||||||
"Run git pull against the current remote. With a prefix arg
|
"Run git pull against the current remote."
|
||||||
will run pull with --rebase."
|
(interactive)
|
||||||
(interactive "P")
|
|
||||||
(let* ((branch (magit-get-current-branch))
|
(let* ((branch (magit-get-current-branch))
|
||||||
(config-branch (and branch (magit-get "branch" branch "merge")))
|
(config-branch (and branch (magit-get "branch" branch "merge")))
|
||||||
(merge-branch (or config-branch
|
(merge-branch (or config-branch
|
||||||
(magit-read-rev (format "Pull from")))))
|
(magit-read-rev (format "Pull from")))))
|
||||||
(if (and branch (not config-branch))
|
(if (and branch (not config-branch))
|
||||||
(magit-set merge-branch "branch" branch "merge"))
|
(magit-set merge-branch "branch" branch "merge"))
|
||||||
(apply 'magit-run-git-async `("pull" "-v" ,@(and rebase '("--rebase"))))))
|
(apply 'magit-run-git-async `("pull" "-v"))))
|
||||||
|
|
||||||
(eval-when-compile (require 'pcomplete))
|
(eval-when-compile (require 'pcomplete))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue