@matheusbsbs / matheus-bagliano / commits / 9e84801396
Fork 0

Check if pack directory exists prior to descending into it

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>

Matthias Kestenholz committed Aug 29, 2006 at 11:12 UTC 9e848013968959bd4de5d407c2ee91cb960c53bb
1 file changed +1 -1
git-repack.sh
+1 -1
@@ -38,7 +38,7 @@ case ",$all_into_one," in
38 pack_objects=
39
40 # Redundancy check in all-into-one case is trivial.
41 - existing=`cd "$PACKDIR" && \
41 + existing=`test -d "$PACKDIR" && cd "$PACKDIR" && \
42 find . -type f \( -name '*.pack' -o -name '*.idx' \) -print`
43 ;;
44 esac