From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Todd Zullinger <tmz@pobox.com>,
Rafael Darder Calvo <rdarder@spiralti.com>
Subject: Re: [PATCH v2] Make sure objects/pack exists before creating a new pack
Date: Tue, 24 Feb 2009 23:15:56 -0800 [thread overview]
Message-ID: <7vk57fc7gz.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vocwrc7oe.fsf_-_@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Tue, 24 Feb 2009 23:11:29 -0800")
This is *not* to be applied, but to document and demonstrate how I tested
the previous fix. It disables the creation of .git/objects/pack/
directory when "git init" is run, and adds minimum workaround in the tests
that assume the directory is always created.
---
builtin-init-db.c | 2 +-
t/t0000-basic.sh | 2 +-
t/t5300-pack-object.sh | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin-init-db.c b/builtin-init-db.c
index d30c3fe..e5fc4c1 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -301,7 +301,7 @@ int init_db(const char *template_dir, unsigned int flags)
safe_create_dir(sha1_dir, 1);
strcpy(path+len, "/pack");
- safe_create_dir(path, 1);
+/* safe_create_dir(path, 1); */
strcpy(path+len, "/info");
safe_create_dir(path, 1);
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 70df15c..6240ca4 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -42,7 +42,7 @@ test_expect_success \
# also it should have 2 subdirectories; no fan-out anymore, pack, and info.
# 3 is counting "objects" itself
find .git/objects -type d -print >full-of-directories
-test_expect_success \
+: test_expect_success \
'.git/objects should have 3 subdirectories.' \
'test $(wc -l < full-of-directories) = 3'
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 73d871c..e7d8daf 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -138,6 +138,7 @@ test_expect_success \
'GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
git init &&
+ mkdir -p .git2/objects/pack &&
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
git diff-tree --root -p $commit &&
while read object
next prev parent reply other threads:[~2009-02-25 7:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-24 17:04 git-push error: Cannot write keep file Rafael Darder Calvo
2009-02-24 17:31 ` Junio C Hamano
2009-02-24 21:21 ` Rafael Darder Calvo
2009-02-25 7:11 ` [PATCH v2] Make sure objects/pack exists before creating a new pack Junio C Hamano
2009-02-25 7:15 ` Junio C Hamano [this message]
2009-02-26 9:19 ` Johannes Sixt
2009-02-26 11:19 ` Mike Ralphson
2009-02-26 15:31 ` Johannes Sixt
2009-02-26 15:54 ` Mike Ralphson
2009-02-26 17:07 ` 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=7vk57fc7gz.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rdarder@spiralti.com \
--cc=tmz@pobox.com \
/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).