Hooks: Simplify deny_binary commit iteration logic

This commit is contained in:
Sebastian Parborg
2026-03-13 18:44:09 +01:00
parent f0357e8394
commit 3abd779df2

View File

@@ -52,8 +52,7 @@ while read oldrev newrev refname; do
fi
# Loop over each commit.
for commit in $(git rev-list --objects ${rev_range} |
git cat-file --batch-check='%(objectname) %(objecttype) %(objectsize) %(rest)' | grep commit | awk '{print $1}'); do
for commit in $(git rev-list --objects ${rev_range} --filter=object:type=commit); do
# Get list of potentially binary files in this commit
mapfile -t binary_files < <(