I see two other possibilities:
1) Would you prefer allowing to run a command by setting commit.template
to something starting with an exclamation mark, i.e. something like
"!git diff --cached --name-status -r"?
2) The pre-commit could receive a file name on the command line. If it
creates that file, it would be used as a template for the commit
message. The default implementation of pre-commit could include,
commented out, a reimplementation of prepare_log_message. I like this
the least.
3) Consider that the patch, as I implemented it, does not act solely on
local data, because the index could be modified by the pre-commit hook.
This possibility is contemplated explicitly in builtin-commit.c:
/*
* Re-read the index as pre-commit hook could have updated it,
* and write it out as a tree.
*/Paolo