summaryrefslogtreecommitdiff
path: root/git-request-pull.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-request-pull.sh')
-rwxr-xr-xgit-request-pull.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/git-request-pull.sh b/git-request-pull.sh
index 1058d2e..957a760 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -92,6 +92,20 @@ check_commit()
errors=$((errors+1))
}
fi
+
+ # 4. The commit should not contain any file matching .gitignore
+ # patterns.
+ local files=$(git show --format= --name-only $commit | \
+ git check-ignore --stdin --no-index)
+ if [ -n "$files" ] ; then
+ echo "Commit $summary contains files matching .gitignore patterns:"
+ local file
+ for file in $files ; do
+ echo "- $file"
+ done
+
+ errors=$((errors+1))
+ fi
}
check_commits() {