aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2019-12-20 23:18:50 +0100
committerJonas Bernoulli <jonas@bernoul.li>2019-12-20 23:18:50 +0100
commitbbb755267a5373774e6b0e61fbc486ea485fad93 (patch)
tree76a090f0bd6f2022648109f4bfec1b10ee970617
parent46013fa81ca74143467a06a6dd7583b8b39f8840 (diff)
magit-rebase-interactive-include-selected: New variable
-rw-r--r--lisp/magit-sequence.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index fb7ff89..f70cb75 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -626,6 +626,8 @@ START has to be selected from a list of recent commits."
(concat "Type %p on a commit to rebase it "
"and commits above it onto " newbase ","))))
+(defvar magit-rebase-interactive-include-selected t)
+
(defun magit-rebase-interactive-1
(commit args message &optional editor delay-edit-confirm noassert confirm)
(declare (indent 2))
@@ -637,7 +639,9 @@ START has to be selected from a list of recent commits."
(unless (magit-rev-ancestor-p commit "HEAD")
(user-error "%s isn't an ancestor of HEAD" commit))
(if (magit-commit-parents commit)
- (setq commit (concat commit "^"))
+ (when (or (not (eq this-command 'magit-rebase-interactive))
+ magit-rebase-interactive-include-selected)
+ (setq commit (concat commit "^")))
(setq args (cons "--root" args)))))
(when (and commit (not noassert))
(setq commit (magit-rebase-interactive-assert