summaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorMatthias Kestenholz <matthias@spinlock.ch>2006-08-29 09:12:14 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-29 09:17:15 (GMT)
commit9e848013968959bd4de5d407c2ee91cb960c53bb (patch)
treeb87fcf3b4bb31637c693fd1113c6882ac6b5b3bb /git-repack.sh
parenta44465ccd998bcb6fbfb49cb63d5206dce26051a (diff)
downloadgit-9e848013968959bd4de5d407c2ee91cb960c53bb.zip
git-9e848013968959bd4de5d407c2ee91cb960c53bb.tar.gz
git-9e848013968959bd4de5d407c2ee91cb960c53bb.tar.bz2
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>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 9da92fb..584a732 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