Added modiciation from a parallel project

This commit is contained in:
Gal Szkolnik 2022-10-23 18:10:30 -04:00
parent e14d5f3566
commit 278be5a6c6
24 changed files with 492 additions and 143 deletions

View file

@ -0,0 +1,13 @@
#! /usr/bin/env bash
LIMIT=${1:-10}
REV_LIST="$(git rev-list --objects --all)"
find $(git rev-parse --git-dir)/objects/pack -type f -name "pack-*.idx" \
| while read pack; do
git verify-pack -v "$pack" | sort -nrk 3 | head -${LIMIT}
done | sort -nrk 3 | head -${LIMIT} \
| while read blobinfo; do
blob=$(echo "$blobinfo" | cut -f1 -d' ')
printf "%s %12s %s\n" $(echo "$blobinfo" | cut -f1,5 -d' ') "$(echo "$REV_LIST" | grep "$blob" | cut -f2 -d' ';)"
done
unset REV_LIST