aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-commit.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2020-11-03 11:19:51 +0100
committerJonas Bernoulli <jonas@bernoul.li>2020-11-03 11:15:42 +0100
commitb18be6c1464060249692acb41b2bc6e43e48fdea (patch)
tree2967489ff5a666c4ad78f9b1f888ee54da5cb9d3 /lisp/magit-commit.el
parentfbe704c62ae6b94b1a7753d097f5ea3f6ca384bf (diff)
Allow more kinds of seemingly empty commits
Closes #4238.
Diffstat (limited to 'lisp/magit-commit.el')
-rw-r--r--lisp/magit-commit.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 3a3d81d..7075586 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -217,7 +217,7 @@ to inverse the meaning of the prefix argument. \n(git commit
(if current-prefix-arg
(not magit-commit-extend-override-date)
magit-commit-extend-override-date)))
- (when (setq args (magit-commit-assert args (not override-date)))
+ (when (setq args (magit-commit-assert args))
(magit-commit-amend-assert)
(let ((process-environment process-environment))
(unless override-date
@@ -357,7 +357,11 @@ depending on the value of option `magit-commit-squash-confirm'."
(and (not strict)
;; ^ For amend variants that don't make sense otherwise.
(or (member "--amend" args)
- (member "--allow-empty" args))))
+ (member "--allow-empty" args)
+ (member "--reset-author" args)
+ (member "--author" args)
+ (member "--signoff" args)
+ (cl-find-if (lambda (a) (string-match-p "\\`--date=" a)) args))))
(or args (list "--")))
((and (magit-rebase-in-progress-p)
(not (magit-anything-unstaged-p))