t0001-init: split the existence test from the permission test

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Sixt 2009-08-09 18:02:55 +02:00 committed by Junio C Hamano
parent 7d53a07a28
commit d82e75e86c

View File

@ -243,6 +243,12 @@ 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