git-prune: prune redundant packs
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 11, 2005 at 10:41 UTC
d7b1a1ddbece22c99d52ea45bdecefdb9f17a613
1 file changed
+11
git-prune.sh
+11
@@ -27,3 +27,14 @@ sed -ne '/unreachable /{
27
}
28
29
git-prune-packed $dryrun
30
+
31
+redundant=$(git-pack-redundant --all)
32
+if test "" != "$redundant"
33
+then
34
+ if test "" = $dryrun
35
+ then
36
+ echo "$redundant" | xargs rm -f
37
+ else
38
+ echo rm -f "$redundant"
39
+ fi
40
+fi