Use magit-log-edit-mode instead of after-change-major-mode-hook