• Jonas Bernoulli's avatar
    Do not merge into wipref when continuing a sequence · a94bc130
    Jonas Bernoulli authored
    Running a command like "git rebase --continue" can result in the user
    being asked to edit a commit message.  When the user confirms the
    message then `with-editor-post-finish-hook' is run. `magit-wip-commit'
    may be a member of that hook.
    Trying to commit to the wipref is unsafe when "git rebase" is running.
    It may result in "git rebase" failing because we hold the index.look,
    or committing failing because some child of "git rebase" does so.
    Teach `magit-wip-maybe-add-commit-hook', which is responsible for
    adding that function when appropriate, to not do so when the commit
    was initiated by a command that calls a "git" command that does other
    things after creating the commit.
magit-commit.el 21.8 KB