From: Matthias Kestenholz Date: Tue, 29 Aug 2006 09:12:14 +0000 (+0200) Subject: Check if pack directory exists prior to descending into it X-Git-Tag: v1.4.3-rc1~159 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9e848013968959bd4de5d407c2ee91cb960c53bb;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-repack.sh b/git-repack.sh index 9da92fb06..584a7323a 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -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