t0001-init: split the existence test from the permission test
authorJohannes Sixt <j6t@kdbg.org>
Sun, 9 Aug 2009 16:02:55 +0000 (18:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Aug 2009 17:43:24 +0000 (10:43 -0700)
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>
t/t0001-init.sh

index 07e011d..5386504 100755 (executable)
@@ -243,6 +243,12 @@ test_expect_success 'init recreates a new bare directory' '
 '
 
 test_expect_success 'init creates a new deep 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
        rm -fr newdir &&
        (
                # Leading directories should honor umask while