[PATCH 2/2] t0001-init: split the existence test from the permission test
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Aug 9, 2009, 15:39 UTC
- Message-ID
- <4A7EEDA7.30301@kdbg.org>
- 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