summaryrefslogtreecommitdiff
path: root/git-prune-script
blob: a24ba616dd4181dd5a5bd97a2d05228080894545 (plain)
1
2
3
4
#!/bin/sh
REFS=$(cat .git/refs/*/*)
[ "$REFS" ] || exit 1
git-fsck-cache --unreachable $REFS | grep unreachable | cut -d' ' -f3 | sed 's:^\(..\):.git/objects/\1/:' | xargs -r rm