diff options
Diffstat (limited to 'git-request-pull.sh')
-rwxr-xr-x | git-request-pull.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/git-request-pull.sh b/git-request-pull.sh index 2b4835c..6a5afea 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -66,7 +66,14 @@ check_commits() { local msg=$(git cat-file commit "$commit") local summary=$(git show --pretty='format:%h ("%s")' -s $commit) - # 1. The commit message shall have Signed-off-by lines + # 1. The commit message shall not contain a local changelog. + if echo -E "$msg" | grep -q '^--- *$' + then + echo "Found local changelog in commit $commit" + errors=$((errors+1)) + fi + + # 2. The commit message shall have Signed-off-by lines # corresponding the committer and the author. local committer=$(echo "$msg" | grep '^committer ' | head -1 | \ cut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev) @@ -84,7 +91,7 @@ check_commits() { errors=$((errors+1)) fi - # 2. Fixes: tags shall reference an ancestor commit. + # 3. Fixes: tags shall reference an ancestor commit. local fixes=$(echo "$msg" | grep '^Fixes: ') if [ -n "$fixes" ] ; then fixes=$(echo "$fixes" | sed 's/^Fixes: \([0-9a-f]\+\) (.*)$/\1/') |