From: Matthias Kestenholz <matthias@spinlock.ch>
To: junkio@cox.net, git@vger.kernel.org
Subject: [PATCH] Check if pack directory exists prior to descending into it
Date: Tue, 29 Aug 2006 11:12:14 +0200 [thread overview]
Message-ID: <20060829091214.GA10155@spinlock.ch> (raw)
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>
---
git-repack.sh | 2 +-
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
--
1.4.2.g2f76
next reply other threads:[~2006-08-29 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 9:12 Matthias Kestenholz [this message]
2006-08-29 9:17 ` [PATCH] Check if pack directory exists prior to descending into it Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060829091214.GA10155@spinlock.ch \
--to=matthias@spinlock.ch \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).