Skip to content

Commit

Permalink
prune: do not show error from pack-redundant when no packs are found.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 7, 2006
1 parent 7d0e65b commit 3be7098
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions git-prune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3be7098

Please sign in to comment.