3 test_description
='detect unwritable repository and fail correctly'
9 say
"chmod a-w .git/objects does not make directory unwritable - skipping tests"
14 test_expect_success setup
'
18 git commit -m initial &&
24 test_expect_success
'write-tree should notice unwritable repository' '
27 chmod a-w .git/objects
28 test_must_fail git write-tree
31 chmod 775 .git/objects
36 test_expect_success
'commit should notice unwritable repository' '
39 chmod a-w .git/objects
40 test_must_fail git commit -m second
43 chmod 775 .git/objects
48 test_expect_success
'update-index should notice unwritable repository' '
52 chmod a-w .git/objects
53 test_must_fail git update-index file
56 chmod 775 .git/objects
61 test_expect_success
'add should notice unwritable repository' '
65 chmod a-w .git/objects
66 test_must_fail git add file
69 chmod 775 .git/objects