3 test_description='detect unwritable repository and fail correctly'
7 test_expect_success setup '
11 git commit -m initial &&
17 test_expect_success 'write-tree should notice unwritable repository' '
20 chmod a-w .git/objects
21 test_must_fail git write-tree
24 chmod 775 .git/objects
29 test_expect_success 'commit should notice unwritable repository' '
32 chmod a-w .git/objects
33 test_must_fail git commit -m second
36 chmod 775 .git/objects
41 test_expect_success 'update-index should notice unwritable repository' '
45 chmod a-w .git/objects
46 test_must_fail git update-index file
49 chmod 775 .git/objects
54 test_expect_success 'add should notice unwritable repository' '
58 chmod a-w .git/objects
59 test_must_fail git add file
62 chmod 775 .git/objects