summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kestenholz <matthias@spinlock.ch>2006-08-29 11:12:14 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-29 02:17:15 -0700
commit9e848013968959bd4de5d407c2ee91cb960c53bb (patch)
treeb87fcf3b4bb31637c693fd1113c6882ac6b5b3bb
parenta44465ccd998bcb6fbfb49cb63d5206dce26051a (diff)
downloadgit-9e848013968959bd4de5d407c2ee91cb960c53bb.tar.gz
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>
-rwxr-xr-xgit-repack.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 9da92fb061..584a7323ac 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