Commit dc0a2e70 authored by Jonas Bernoulli's avatar Jonas Bernoulli

git-commit-run-post-finish-hook: Cosmetics

parent 541d0f09
......@@ -533,14 +533,15 @@ This is only used if Magit is available."
(defun git-commit-run-post-finish-hook (previous)
(when git-commit-post-finish-hook
(cl-block nil
(let ((start (current-time)))
(let ((break (time-add (current-time)
(seconds-to-time 1))))
(while (equal (magit-rev-parse "HEAD") previous)
(when (> (float-time (time-subtract (current-time) start)) 1)
(if (time-less-p (current-time) break)
(sit-for 0.01)
(message "No commit created after 1 second. Not running %s."
'git-commit-post-finish-hook)
(cl-return))
(sit-for 0.1))))
(run-hooks 'git-commit-post-finish-hook)))
(cl-return))))
(run-hooks 'git-commit-post-finish-hook))))
(define-minor-mode git-commit-mode
"Auxiliary minor mode used when editing Git commit messages.
......
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