@matheusbsbs / matheus-bagliano / commits / d82e75e86c
Fork 0

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>

Johannes Sixt committed Aug 9, 2009 at 18:02 UTC d82e75e86c8d1555aaa6415034aff215633fe7f2
1 file changed +6
t/t0001-init.sh
+6
@@ -243,6 +243,12 @@ test_expect_success 'init recreates a new bare directory' '
243 '
244
245 test_expect_success 'init creates a new deep directory' '
246 + rm -fr newdir &&
247 + git init newdir/a/b/c &&
248 + test -d newdir/a/b/c/.git/refs
249 +'
250 +
251 +test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shared)' '
252 rm -fr newdir &&
253 (
254 # Leading directories should honor umask while