Last active
October 24, 2022 12:25
-
-
Save marcan/b4328c490ff4f4f6d45509ac117edb93 to your computer and use it in GitHub Desktop.
Asahi Linux patch stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
ROOT=remotes/origin | |
total=0 | |
for i in $(git for-each-ref --format="%(refname:short)" refs/$ROOT/bits/); do | |
name="${i##*/}" | |
base=$ROOT/base | |
if git rev-parse --verify "$ROOT/bases/$name" &>/dev/null; then | |
base="$ROOT/bases/$name" | |
fi | |
count="$(git rev-list $base..$i | wc -l)" | |
printf "%20s %d\n" "$name" "$count" | |
total=$((total+count)) | |
done | |
echo | |
printf "%20s %d\n" "TOTAL" "$total" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment