Skip to content

Commit d82e75e

Browse files
j6tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7d53a07 commit d82e75e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t0001-init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ test_expect_success 'init recreates a new bare directory' '
243243
'
244244

245245
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)' '
246252
rm -fr newdir &&
247253
(
248254
# Leading directories should honor umask while

0 commit comments

Comments
 (0)