> In the message hook, just grep if the template was already added. If itAh, so you want me to always type ":q!" to exit and unnecessarily complicate the commit-msg hook. Cunning, but no, thanks. I'll make an example. This is my prepare-commit-msg hook: diff_collect_changelog () { git diff "$@" -- \ `git diff "$@" --name-status -r | \ awk '/ChangeLog/ { print substr ($0, 3) }'` | sed -n \ -e '/^@@/,/^+/ {' \ -e ' s/^ //p' \ -e ' t' \ -e '}' \ -e '/^diff/,/^@@/ {' \ -e ' s/^diff --git a\/\(.*\)\/ChangeLog[^ ]* b\/.*/\1:/p' \ -e ' tdummy' \ -e ' :dummy' \ -e ' d' \ -e '}' \ -e 's/^+//p' \ -e 't' } diff_collect_changelog --cached > /tmp/foo$$ cat "$GIT_COMMIT_MSG" >> /tmp/foo$$ && \ mv /tmp/foo$$ "$GIT_COMMIT_MSG" rm -f /tmp/foo$$ or something like that. The alternative I see would be to start the vi editing session with "!!make_changelog --cached". So I thought about having an hook that runs the command for me. Do you have better ideas? Paolo - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Miller | Re: Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jan Engelhardt | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
