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 <junkio@cox.net>
Junio C Hamano committed
Jan 7, 2006 at 00:29 UTC
3be7098ce444395959c856de1eb9312550193aac
1 file changed
+1
-2
git-prune.sh
+1
-2
@@ -33,8 +33,7 @@ sed -ne '/unreachable /{
33
34
git-prune-packed $dryrun
35
36
-redundant=$(git-pack-redundant --all)
37
-if test "" != "$redundant"
36
+if redundant=$(git-pack-redundant --all 2>/dev/null) && test "" != "$redundant"
37
then
38
if test "" = "$dryrun"
39
then