Skip to content

Commit 3be7098

Browse files
author
Junio C Hamano
committed
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>
1 parent 7d0e65b commit 3be7098

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

git-prune.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ sed -ne '/unreachable /{
3333

3434
git-prune-packed $dryrun
3535

36-
redundant=$(git-pack-redundant --all)
37-
if test "" != "$redundant"
36+
if redundant=$(git-pack-redundant --all 2>/dev/null) && test "" != "$redundant"
3837
then
3938
if test "" = "$dryrun"
4039
then

0 commit comments

Comments
 (0)