Skip to content

Commit

Permalink
Check if pack directory exists prior to descending into it
Browse files Browse the repository at this point in the history
This fixes the following warning:

git-repack: line 42: cd: .git/objects/pack: No such file or directory

This happens only, when git-repack -a is run without any packs in the
repository.

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Matthias Kestenholz authored and Junio C Hamano committed Aug 29, 2006
1 parent a44465c commit 9e84801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-repack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ case ",$all_into_one," in
pack_objects=

# Redundancy check in all-into-one case is trivial.
existing=`cd "$PACKDIR" && \
existing=`test -d "$PACKDIR" && cd "$PACKDIR" && \
find . -type f \( -name '*.pack' -o -name '*.idx' \) -print`
;;
esac
Expand Down

0 comments on commit 9e84801

Please sign in to comment.