git/format-message: make code clearer

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
Refactor git hook

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>