projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
770896e
)
Make "git-prune-script" take all refs into account.
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Thu, 5 May 2005 00:26:41 +0000
(17:26 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Thu, 5 May 2005 00:26:41 +0000
(17:26 -0700)
This avoids pruning the kernel v2.6.11 tree that now has a tag.
git-prune-script
patch
|
blob
|
history
diff --git
a/git-prune-script
b/git-prune-script
index b6e927a749a95614fed1f0e651417edbec84eb56..a24ba616dd4181dd5a5bd97a2d05228080894545 100755
(executable)
--- a/
git-prune-script
+++ b/
git-prune-script
@@
-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