git/git-prune-script
Linus Torvalds 4feb7a016a Make "git-prune-script" take all refs into account.
This avoids pruning the kernel v2.6.11 tree that now has a tag.
2005-05-04 17:26:41 -07:00

5 lines
178 B
Bash
Executable File

#!/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