summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-30 21:59:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-09-30 21:59:53 (GMT)
commit1e633418479926bc85ed21a4f91c845a3dd3ad66 (patch)
treeabcd420c9b200b22e4c62065b2b4db089c091a50 /t
parent9855b08d35edf8a8a441f24ff7b00e220a29f261 (diff)
parent8695353147e0c20fc8197fd73efec2ca9bce0304 (diff)
downloadgit-1e633418479926bc85ed21a4f91c845a3dd3ad66.zip
git-1e633418479926bc85ed21a4f91c845a3dd3ad66.tar.gz
git-1e633418479926bc85ed21a4f91c845a3dd3ad66.tar.bz2
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-xt/t0004-unwritable.sh52
1 files changed, 14 insertions, 38 deletions
diff --git a/t/t0004-unwritable.sh b/t/t0004-unwritable.sh
index 385b126..e3137d6 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