3 test_description
='detect unwritable repository and fail correctly'
7 test_expect_success setup
'
12 git commit -m initial &&
18 test_expect_success POSIXPERM
,SANITY
'write-tree should notice unwritable repository' '
19 test_when_finished "chmod 775 .git/objects .git/objects/??" &&
20 chmod a-w .git/objects .git/objects/?? &&
21 test_must_fail git write-tree
24 test_expect_success POSIXPERM
,SANITY
'commit should notice unwritable repository' '
25 test_when_finished "chmod 775 .git/objects .git/objects/??" &&
26 chmod a-w .git/objects .git/objects/?? &&
27 test_must_fail git commit -m second
30 test_expect_success POSIXPERM
,SANITY
'update-index should notice unwritable repository' '
31 test_when_finished "chmod 775 .git/objects .git/objects/??" &&
33 chmod a-w .git/objects .git/objects/?? &&
34 test_must_fail git update-index file
37 test_expect_success POSIXPERM
,SANITY
'add should notice unwritable repository' '
38 test_when_finished "chmod 775 .git/objects .git/objects/??" &&
40 chmod a-w .git/objects .git/objects/?? &&
41 test_must_fail git add file