Commit fa0e336c authored by Jonas Bernoulli's avatar Jonas Bernoulli

Only merge into wipref after commit if any wip mode is enabled

The merging is done using `magit-wip-commit', which does more than
just merge.  It also creates the wipref if it doesn't exist yet and
that is clearly undesirable when the user hasn't enabled any of the
wip modes.
parent aaf7af15
......@@ -496,7 +496,9 @@ This is only used if Magit is available."
(add-hook 'with-editor-pre-cancel-hook
'git-commit-save-message nil t)
(add-hook 'with-editor-post-finish-hook 'git-commit-run-post-finish-hook)
(when (bound-and-true-p magit-wip-merge-branch)
(when (and (bound-and-true-p magit-wip-merge-branch)
(fboundp 'magit-wip-any-enabled-p)
(add-hook 'with-editor-post-finish-hook
'magit-wip-commit nil t))
(setq with-editor-cancel-message
......@@ -350,6 +350,14 @@ commit message."
(concat "refs/heads/" branch))
(defun magit-wip-any-enabled-p ()
(or magit-wip-mode
;;; Log
(defun magit-wip-log-index (args files)
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