On Mon, Apr 09, 2012 at 06:39:22AM -0600, Eric Blake wrote:
On 04/08/2012 02:11 AM, Dan Kenigsberg wrote:
Anything cooler we can do beyond putting
SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^(.*>).*$/Signed-off-by: \1/p') grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
at the bottom of .git/hooks/commit-msg ?
To fix 'git format-patch' (which is used by 'git send-email'), use:
git config format.signoff true
But that only adds it when you send a patch, not when you make the commit. You can also use 'git commit -s' to add the signoff when you create the commit, but I don't know of a configuration bool that will make that automatic, short of your hack on the commit-msg hook.
I couldn't find a similar config value for git commit, but there's git commit -s to do it manually.