diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-30 14:59:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-30 14:59:53 -0700 |
commit | 1e633418479926bc85ed21a4f91c845a3dd3ad66 (patch) | |
tree | abcd420c9b200b22e4c62065b2b4db089c091a50 /t | |
parent | 9855b08d35edf8a8a441f24ff7b00e220a29f261 (diff) | |
parent | 8695353147e0c20fc8197fd73efec2ca9bce0304 (diff) | |
download | git-1e633418479926bc85ed21a4f91c845a3dd3ad66.tar.gz git-1e633418479926bc85ed21a4f91c845a3dd3ad66.tar.xz |
Merge branch 'maint'
* maint:
Fix typo in pack-objects' usage
Make sure that git_getpass() never returns NULL
t0004 (unwritable files): simplify error handling
rev-list-options: clarify --parents and --children
Diffstat (limited to 't')
-rwxr-xr-x | t/t0004-unwritable.sh | 52 |
1 files changed, 14 insertions, 38 deletions
diff --git a/t/t0004-unwritable.sh b/t/t0004-unwritable.sh index 385b1265d..e3137d638 100755 --- a/t/t0004-unwritable.sh +++ b/t/t0004-unwritable.sh @@ -16,53 +16,29 @@ test_expect_success setup ' ' test_expect_success POSIXPERM,SANITY 'write-tree should notice unwritable repository' ' - - ( - chmod a-w .git/objects .git/objects/?? && - test_must_fail git write-tree - ) - status=$? - chmod 775 .git/objects .git/objects/?? - (exit $status) - + test_when_finished "chmod 775 .git/objects .git/objects/??" && + chmod a-w .git/objects .git/objects/?? && + test_must_fail git write-tree ' test_expect_success POSIXPERM,SANITY 'commit should notice unwritable repository' ' - - ( - chmod a-w .git/objects .git/objects/?? && - test_must_fail git commit -m second - ) - status=$? - chmod 775 .git/objects .git/objects/?? - (exit $status) - + test_when_finished "chmod 775 .git/objects .git/objects/??" && + chmod a-w .git/objects .git/objects/?? && + test_must_fail git commit -m second ' test_expect_success POSIXPERM,SANITY 'update-index should notice unwritable repository' ' - - ( - echo 6O >file && - chmod a-w .git/objects .git/objects/?? && - test_must_fail git update-index file - ) - status=$? - chmod 775 .git/objects .git/objects/?? - (exit $status) - + test_when_finished "chmod 775 .git/objects .git/objects/??" && + echo 6O >file && + chmod a-w .git/objects .git/objects/?? && + test_must_fail git update-index file ' test_expect_success POSIXPERM,SANITY 'add should notice unwritable repository' ' - - ( - echo b >file && - chmod a-w .git/objects .git/objects/?? && - test_must_fail git add file - ) - status=$? - chmod 775 .git/objects .git/objects/?? - (exit $status) - + test_when_finished "chmod 775 .git/objects .git/objects/??" && + echo b >file && + chmod a-w .git/objects .git/objects/?? && + test_must_fail git add file ' test_done |