summaryrefslogtreecommitdiff
path: root/lisp/km-magit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/km-magit.el')
-rw-r--r--lisp/km-magit.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index f6f4cdf..bd14dcb 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -881,9 +881,6 @@ appending [M/N] to each entry."
;; specified.
(when (magit-anything-modified-p t)
(user-error "There are uncommitted changes"))
- (setq args (seq-remove
- (lambda (a) (string-match-p "\\`--base=" a))
- args))
(let* ((current (magit-get-current-branch))
(upstream (or (magit-get-upstream-branch current)
(user-error "No upstream branch")))
@@ -894,8 +891,10 @@ appending [M/N] to each entry."
(concat "reset: moving back to " current)
current)
(magit-branch-checkout patch-branch))
- (apply #'magit-run-git "format-patch"
- upstream (concat "--base=" upstream) args)
+ (unless (seq-some (lambda (a) (string-match-p "\\`--base=" a))
+ args)
+ (setq args (cons (concat "--base=" upstream) args)))
+ (apply #'magit-run-git "format-patch" upstream args)
(let* ((patches (or (seq-filter
(lambda (f) (string-suffix-p ".patch" f))
(magit-untracked-files))