On Sat, Nov 22, 2008 at 04:55:41PM +0100, SZEDER Gábor wrote: > Thanks for the tip. Junio's suggestion about '# Everything under this > line is deleted.' could be implemented this way fairly easily (just an > additional echo in prepare-commit-msg, and other pattern in > commit-msg). But 'git commit --no-verify' is indeed a problem. > Although I never use it explicitly, 'git rebase -i' does so. One other option would be to munge the editor script instead of using hooks. I.e., something like this: $ cat ~/local/bin/git-editor #!/bin/sh echo '# Everything under this line is deleted' >>"$1" git diff --cached >>"$1" $EDITOR "$1" || exit $? sed -i '/^# Everything under this line is deleted$/Q' "$1" $ git config core.editor ~/local/bin/git-editor Of course, then you end up with the munging for things like "git rebase -i" picking commits, but it should be harmless (since we end up removing it anyway). -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html