Merge branch 'development' of github.com:mongodb/kingfisher into development

* 'development' of github.com:mongodb/kingfisher:
  Update install-prereceive-hook.sh
This commit is contained in:
Mick Grove 2025-07-25 10:32:26 -07:00
commit 6ff13df4e2

View file

@ -20,8 +20,13 @@ if ! command -v kingfisher >/dev/null 2>&1; then
fi
while read -r oldrev newrev refname; do
git diff-tree --no-commit-id --name-only -r "$oldrev" "$newrev" -z |
xargs -0 --no-run-if-empty kingfisher scan --no-update-check
if [ "$oldrev" = "0000000000000000000000000000000000000000" ]; then
git diff-tree --name-only -r "$newrev" -z |
xargs -0 --no-run-if-empty kingfisher scan --no-update-check
else
git diff-tree --no-commit-id --name-only -r "$oldrev" "$newrev" -z |
xargs -0 --no-run-if-empty kingfisher scan --no-update-check
fi
status=$?
if [ "$status" -ne 0 ]; then
echo "Kingfisher detected secrets in push. Push rejected." >&2