All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH 2/2] t0001-init: split the existence test from the permission test
Date: Sun, 09 Aug 2009 17:39:19 +0200	[thread overview]
Message-ID: <4A7EEDA7.30301@kdbg.org> (raw)
In-Reply-To: <4A7EED5C.8050707@kdbg.org>

The test for correct permissions after init created a deep directory
must be guarded by POSIXPERM. But testing that the deep dirctory exists
is good even on platforms that do not provide the POSIXPERM prerequiste.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
  t/t0001-init.sh |    8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 07e011d..e53b234 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -245,6 +245,14 @@ test_expect_success 'init recreates a new bare directory' '
  test_expect_success 'init creates a new deep directory' '
  	rm -fr newdir &&
  	(
+		git init newdir/a/b/c &&
+		test -d newdir/a/b/c/.git/refs
+	)
+'
+
+test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shared)' '
+	rm -fr newdir &&
+	(
  		# Leading directories should honor umask while
  		# the repository itself should follow "shared"
  		umask 002 &&
-- 
1.6.4.1186.g1d9a

  reply	other threads:[~2009-08-09 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09 15:38 [PATCH 1/2] t0001-init: fix a file name Johannes Sixt
2009-08-09 15:39 ` Johannes Sixt [this message]
2009-08-09 16:02   ` [PATCH v2 2/2] t0001-init: split the existence test from the permission test Johannes Sixt

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=4A7EEDA7.30301@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.