From: Junio C Hamano Date: Fri, 11 Nov 2005 18:41:53 +0000 (-0800) Subject: git-prune: prune redundant packs X-Git-Tag: v0.99.9h^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d7b1a1ddbece22c99d52ea45bdecefdb9f17a613;p=git.git git-prune: prune redundant packs Signed-off-by: Junio C Hamano --- diff --git a/git-prune.sh b/git-prune.sh index ef31bd2a6..aa7980731 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