aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-commit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/magit-commit.el')
-rw-r--r--lisp/magit-commit.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 2e1b730..a8c9aaf 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -549,20 +549,19 @@ is updated:
(user-error "There are no modified modules that could be absorbed"))
(when commit
(setq commit (magit-rebase-interactive-assert commit t)))
- (if (and commit (eq phase 'run))
- (progn
- (dolist (module modules)
- (when-let ((msg (magit-git-string
- "log" "-1" "--format=%s"
- (concat commit "..") "--" module)))
- (magit-git "commit" "-m" (concat "fixup! " msg)
- "--only" "--" module)))
- (magit-refresh)
- t)
- (magit-log-select
- (lambda (commit)
- (magit-commit-absorb-modules 'run commit))
- nil nil nil nil commit))))
+ (cond ((and commit (eq phase 'run))
+ (dolist (module modules)
+ (when-let ((msg (magit-git-string
+ "log" "-1" "--format=%s"
+ (concat commit "..") "--" module)))
+ (magit-git "commit" "-m" (concat "fixup! " msg)
+ "--only" "--" module)))
+ (magit-refresh)
+ t)
+ ((magit-log-select
+ (lambda (commit)
+ (magit-commit-absorb-modules 'run commit))
+ nil nil nil nil commit)))))
;;;###autoload(autoload 'magit-commit-absorb "magit-commit" nil t)
(transient-define-prefix magit-commit-absorb (phase commit args)