From 3abd779df2fb0ab8d8ed3518e77f8528798ba459 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Fri, 13 Mar 2026 18:44:09 +0100 Subject: [PATCH] Hooks: Simplify deny_binary commit iteration logic --- hooks/deny_binary | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hooks/deny_binary b/hooks/deny_binary index 48e5ace..ccf08a0 100755 --- a/hooks/deny_binary +++ b/hooks/deny_binary @@ -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 < <(