diff options
Diffstat (limited to 'templates/hooks--commit-msg')
-rw-r--r-- | templates/hooks--commit-msg | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/hooks--commit-msg b/templates/hooks--commit-msg index 0b906caa98..9b04f2d69c 100644 --- a/templates/hooks--commit-msg +++ b/templates/hooks--commit-msg @@ -8,6 +8,10 @@ # # To enable this hook, make this file executable. +# Uncomment the below to add a Signed-off-by line to the message. +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | |