You’re absolutely right. Here’s a slopcoded rewrite that does run a ton faster and doesn’t use git last-modified (which is labelled experimental but was kind of the original inspiration). I even got it to do relative filenames instead of the full path to the root of the repo which I had been wanting.
cat .local/bin/git-slopblame
#!/usr/bin/env bash
# Show when <paths> were last committed, with date, author and commit title
paths=("$@")
if ((${#paths[@]} == 0)); then
paths=(".")
fi
git log --format='@@@%h%x09%as%x09%an%x09%s' --relative --name-only -- "${paths[@]}" |
awk '/^@@@/ {
commit = substr($0, 4)
next
} length($0) && !seen[$0]++ {
print commit "\t" $0
}' |
while IFS=$'\t' read -r hash date author subject file; do
printf '%s:\033[34m%s\033[0m \033[32m%s\033[0m \033[34m%s:\033[0m%s\n' \
"$hash" "$date" "$author" "$file" "$subject"
done














The sum is only 92% anyway. It’s not showing small parties or independents.