Index: tools/tools/git/hooks/prepare-commit-msg =================================================================== --- /dev/null +++ tools/tools/git/hooks/prepare-commit-msg @@ -0,0 +1,55 @@ +#!/bin/sh + +case "$2" in +commit|message) + # It appears git invokes this script for interactive rebase but does + # not remove commented lines, so just exit if we're not called with the + # default (comment-containing) template. + egrep -q '^#' "$1" || return 0 + ;; +template) + return 0 + ;; +merge) + return 0 + ;; +esac + +outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) +cat >$outfile <