Skip to content

Commit

Permalink
Make "git-prune-script" take all refs into account.
Browse files Browse the repository at this point in the history
This avoids pruning the kernel v2.6.11 tree that now has a tag.
  • Loading branch information
Linus Torvalds committed May 5, 2005
1 parent 770896e commit 4feb7a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-prune-script
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4feb7a0

Please sign in to comment.