From: Junio C Hamano Date: Sat, 7 Jan 2006 08:29:48 +0000 (-0800) Subject: prune: do not show error from pack-redundant when no packs are found. X-Git-Tag: v1.0.8^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3be7098ce444395959c856de1eb9312550193aac;p=git.git prune: do not show error from pack-redundant when no packs are found. When there is no pack yet, git-prune leaked an error message from "git-pack-redundant --all" which complained that there is no pack. Squelch the annoying message. Signed-off-by: Junio C Hamano --- diff --git a/git-prune.sh b/git-prune.sh index 7b61d05c4..c5a5d29aa 100755 --- a/git-prune.sh +++ b/git-prune.sh @@ -33,8 +33,7 @@ sed -ne '/unreachable /{ git-prune-packed $dryrun -redundant=$(git-pack-redundant --all) -if test "" != "$redundant" +if redundant=$(git-pack-redundant --all 2>/dev/null) && test "" != "$redundant" then if test "" = "$dryrun" then