Commit 2059e8d3 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-refresh: Run magit-post-commit-hook when appropriate

`this-command' is always nil when that hook should be run because
invoking the respective commands involves the server, which sets
that value.  In this case we have to check the value `last-command'
instead.
parent e0f8a8c7
......@@ -1019,7 +1019,8 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'."
(magit-refresh-buffer)))
(magit-auto-revert-buffers)
(cond
((memq this-command magit-post-commit-hook-commands)
((and (not this-command)
(memq last-command magit-post-commit-hook-commands))
(magit-run-hook-with-benchmark 'magit-post-commit-hook))
((memq this-command magit-post-stage-hook-commands)
(magit-run-hook-with-benchmark 'magit-post-stage-hook))
......
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