Honor commit-msg hook for 'new' and 'edit'.

The commit-msg hook is important for gerrit users, where it
generates a Change-Id.

Change-Id: Ic1fde9e13e5e903ac8807be37feb7a88a9844dce