diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-24 21:50:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-24 21:50:48 -0700 |
commit | 31c6390d40fe12a46c38d7224da61c6771886f2a (patch) | |
tree | 3856f02ce893c6254fcb0940ec57566ec385bb76 /t | |
parent | 3ffb58be0a779b47e1e4d3ea584ba301461a3a77 (diff) | |
parent | 3ef6a1fe95b0a5aaca21a86651850ef5d62327fa (diff) | |
download | git-31c6390d40fe12a46c38d7224da61c6771886f2a.tar.gz |
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
t5516: remove ambiguity test (1)
Linked glossary from cvs-migration page
write-tree: properly detect failure to write tree objects
Diffstat (limited to 't')
-rwxr-xr-x | t/t0004-unwritable.sh | 67 | ||||
-rwxr-xr-x | t/t5516-fetch-push.sh | 14 |
2 files changed, 68 insertions, 13 deletions
diff --git a/t/t0004-unwritable.sh b/t/t0004-unwritable.sh new file mode 100755 index 0000000000..9255c63c08 --- /dev/null +++ b/t/t0004-unwritable.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +test_description='detect unwritable repository and fail correctly' + +. ./test-lib.sh + +test_expect_success setup ' + + >file && + git add file && + git commit -m initial && + echo >file && + git add file + +' + +test_expect_success 'write-tree should notice unwritable repository' ' + + ( + chmod a-w .git/objects + test_must_fail git write-tree + ) + status=$? + chmod 775 .git/objects + (exit $status) + +' + +test_expect_success 'commit should notice unwritable repository' ' + + ( + chmod a-w .git/objects + test_must_fail git commit -m second + ) + status=$? + chmod 775 .git/objects + (exit $status) + +' + +test_expect_success 'update-index should notice unwritable repository' ' + + ( + echo a >file && + chmod a-w .git/objects + test_must_fail git update-index file + ) + status=$? + chmod 775 .git/objects + (exit $status) + +' + +test_expect_success 'add should notice unwritable repository' ' + + ( + echo b >file && + chmod a-w .git/objects + test_must_fail git add file + ) + status=$? + chmod 775 .git/objects + (exit $status) + +' + +test_done diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 6d7e738548..f93a100f87 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -209,19 +209,7 @@ test_expect_success 'push with weak ambiguity (2)' ' ' -test_expect_success 'push with ambiguity (1)' ' - - mk_test remotes/origin/master remotes/frotz/master && - if git push testrepo master:master - then - echo "Oops, should have failed" - false - else - check_push_result $the_first_commit remotes/origin/master remotes/frotz/master - fi -' - -test_expect_success 'push with ambiguity (2)' ' +test_expect_success 'push with ambiguity' ' mk_test heads/frotz tags/frotz && if git push testrepo master:frotz |