Commit 8cda790d authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-commit-diff: handle committing with --all argument

To do so set `this-command' to the fake command `magit-commit-all'
in `magit-commit' when "--all" is used and handle the fake command
in `magit-commit-diff'.

Fixes #3095.
parent a5a5eb40
......@@ -160,6 +160,8 @@ With a prefix argument, amend to the commit at `HEAD' instead.
(interactive (if current-prefix-arg
(list (cons "--amend" (magit-commit-arguments)))
(list (magit-commit-arguments))))
(when (member "--all" args)
(setq this-command 'magit-commit-all))
(when (setq args (magit-commit-assert args))
(magit-run-git-with-editor "commit" args)))
......@@ -329,6 +331,8 @@ depending on the value of option `magit-commit-squash-confirm'."
(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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment