This commit was sponsored by Andrew Cant.
This allows bypassing the direct mode guard in a safe way to do all sorts of things including git revert, git mv, git checkout ... This commit was sponsored by the WikiMedia Foundation.