summaryrefslogtreecommitdiff
path: root/git-prune.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-11 18:41:53 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-12 05:19:11 (GMT)
commitd7b1a1ddbece22c99d52ea45bdecefdb9f17a613 (patch)
tree4ee27c9e30c7fa9a5b022f126ee93968df777b06 /git-prune.sh
parent1c3039e8f1eb01766cff976793c8f439095967f6 (diff)
downloadgit-d7b1a1ddbece22c99d52ea45bdecefdb9f17a613.zip
git-d7b1a1ddbece22c99d52ea45bdecefdb9f17a613.tar.gz
git-d7b1a1ddbece22c99d52ea45bdecefdb9f17a613.tar.bz2
git-prune: prune redundant packs
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-prune.sh')
-rwxr-xr-xgit-prune.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-prune.sh b/git-prune.sh
index ef31bd2..aa79807 100755
--- a/git-prune.sh
+++ b/git-prune.sh
@@ -27,3 +27,14 @@ sed -ne '/unreachable /{
}
git-prune-packed $dryrun
+
+redundant=$(git-pack-redundant --all)
+if test "" != "$redundant"
+then
+ if test "" = $dryrun
+ then
+ echo "$redundant" | xargs rm -f
+ else
+ echo rm -f "$redundant"
+ fi
+fi