diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2019-05-07 15:32:21 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2019-07-29 17:37:39 +0200 |
| commit | afedd5bb944008cd8c89b8bc607aedcfb6870cf1 (patch) | |
| tree | a5cafedbe22851e3d100a3f44bcc13023503b961 /lisp/magit-commit.el | |
| parent | 995c1d8a79c53e69f79b17b2b4cd5298a1380be7 (diff) | |
magit-commit-diff: Simplify
Diffstat (limited to 'lisp/magit-commit.el')
| -rw-r--r-- | lisp/magit-commit.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el index 34c3fc5..0eeba41 100644 --- a/lisp/magit-commit.el +++ b/lisp/magit-commit.el @@ -469,19 +469,18 @@ is available from https://github.com/torbiak/git-autofixup." (magit-display-buffer-noselect t) (inhibit-quit nil)) (message "Diffing changes to be committed (C-g to abort diffing)") - (if-let ((fn (cl-case last-command - (magit-commit - (apply-partially 'magit-diff-staged nil)) - (magit-commit-all - (apply-partially 'magit-diff-working-tree nil)) - ((magit-commit-amend - magit-commit-reword - magit-rebase-reword-commit) - 'magit-diff-while-amending)))) - (funcall fn args) - (if (magit-anything-staged-p) - (magit-diff-staged nil args) - (magit-diff-while-amending args)))) + (cl-case last-command + (magit-commit + (magit-diff-staged nil args)) + (magit-commit-all + (magit-diff-working-tree nil args)) + ((magit-commit-amend + magit-commit-reword + magit-rebase-reword-commit) + (magit-diff-while-amending args)) + (t (if (magit-anything-staged-p) + (magit-diff-staged nil args) + (magit-diff-while-amending args))))) (quit)))) ;; Mention `magit-diff-while-committing' because that's |
