Three random thoughts.
- pre-editor is too generic a name because before making a
commit is not the only place we give you $EDITOR (both am and
tag do EDITOR thing IIRC). So the hook name must be more
specific to the commit codepath (otherwise your pre-editor
hook needs to be able to tell which codepath called it).
- git-commit gives you EDITOR when you are making a merge, and
you would probably want to keep the default merge commit
message without the prefixed directory thing. You probably
do not want to do this while doing --amend either.
- it might make sense to have a "commit template" that is used
when making a non-merge commit afresh (i.e. without -F, -m,
-c or -C to specify messages), instead of a hook script.