Commit c2cd780b authored by Jonas Bernoulli's avatar Jonas Bernoulli

Teach rebase commands to use "git rbr" when appropriate

Users still have to initiate the "rbr" rebase on the command-line or
use the `magit-rbr' package (https://github.com/fanatoly/magit-rbr).

Also see https://github.com/melpa/melpa/pull/5631.  This won't work
until https://github.com/fanatoly/magit-rbr/pull/1 is merged.
parent b7ee4dd0
......@@ -675,11 +675,11 @@ edit. With a prefix argument the old message is reused as-is."
(if noedit
(let ((process-environment process-environment))
(push "GIT_EDITOR=true" process-environment)
(magit-run-git-async "rebase" "--continue")
(magit-run-git-async (magit--rebase-resume-command) "--continue")
(set-process-sentinel magit-this-process
#'magit-sequencer-process-sentinel)
magit-this-process)
(magit-run-git-sequencer "rebase" "--continue")))
(magit-run-git-sequencer (magit--rebase-resume-command) "--continue")))
(user-error "No rebase in progress")))
;;;###autoload
......@@ -688,7 +688,7 @@ edit. With a prefix argument the old message is reused as-is."
(interactive)
(unless (magit-rebase-in-progress-p)
(user-error "No rebase in progress"))
(magit-run-git-sequencer "rebase" "--skip"))
(magit-run-git-sequencer (magit--rebase-resume-command) "--skip"))
;;;###autoload
(defun magit-rebase-edit ()
......@@ -705,13 +705,16 @@ edit. With a prefix argument the old message is reused as-is."
(unless (magit-rebase-in-progress-p)
(user-error "No rebase in progress"))
(magit-confirm 'abort-rebase "Abort this rebase")
(magit-run-git "rebase" "--abort"))
(magit-run-git (magit--rebase-resume-command) "--abort"))
(defun magit-rebase-in-progress-p ()
"Return t if a rebase is in progress."
(or (file-exists-p (magit-git-dir "rebase-merge"))
(file-exists-p (magit-git-dir "rebase-apply/onto"))))
(defun magit--rebase-resume-command ()
(if (file-exists-p (magit-git-dir "rebase-recursive")) "rbr" "rebase"))
;;; Sections
(defun magit-insert-sequencer-sequence ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment