-
-
Notifications
You must be signed in to change notification settings - Fork 114
Be sure your commit is Signed off by
Federico Fissore edited this page Sep 15, 2015
·
4 revisions
In order for your contributed code to be included, it needs to be "Signed-off". More info about it are available in file CONTRIBUTING.md
Signing off is a manual operation and therefore easy to forget. You can tell git to help you checking if it's missing: it will prevent you from adding a commit that is not signed off.
Create file REPO/.git/hooks/commit-msg
and give it executable permissions. Paste the following code into it:
#!/bin/sh
test "" = "$(grep 'Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
test "" != "$(grep 'Signed-off-by: ' "$1")" || {
echo >&2 Missing Signed-off-by line. Missing --signoff?
exit 1
}