Make "git-prune-script" take all refs into account.

This avoids pruning the kernel v2.6.11 tree that now has a tag.
This commit is contained in:
Linus Torvalds 2005-05-04 17:26:41 -07:00
parent 770896e548
commit 4feb7a016a

View file

@ -1,2 +1,4 @@
#!/bin/sh
git-fsck-cache --unreachable $(cat .git/HEAD ) | grep unreachable | cut -d' ' -f3 | sed 's:^\(..\):.git/objects/\1/:' | xargs rm
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