Browse Source

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>
maint
Johannes Sixt 16 years ago committed by Junio C Hamano
parent
commit
d82e75e86c
  1. 6
      t/t0001-init.sh

6
t/t0001-init.sh

@ -243,6 +243,12 @@ test_expect_success 'init recreates a new bare directory' ' @@ -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

Loading…
Cancel
Save