diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-11-23 13:28:53 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-11-23 13:28:53 -0800 |
| commit | 3686aa1caf907d22fe318c28efe93f0e7870ba50 (patch) | |
| tree | f99a303bd14c7343be7ccc5b9df5382f1bf79246 /t/t0004-unwritable.sh | |
| parent | aa2577a9c3bd5559bd580feca6edec4d70254adc (diff) | |
| parent | 1e501a7c47ad5ada53d3b1acfb9f131f76e969ec (diff) | |
| download | git-tj/maint-imap-send-remove-unused.tar.gz | |
Merge branch 'maint' into tj/imap-send-remove-unusedtj/maint-imap-send-remove-unused
* maint: (18123 commits)
documentation fix: git difftool uses diff tools, not merge tools.
Git 1.7.7.4
Makefile: add missing header file dependencies
notes merge: eliminate OUTPUT macro
mailmap: xcalloc mailmap_info
name-rev --all: do not even attempt to describe non-commit object
Git 1.7.7.3
docs: Update install-doc-quick
docs: don't mention --quiet or --exit-code in git-log(1)
Git 1.7.7.2
t7511: avoid use of reserved filename on Windows.
clone: Quote user supplied path in a single quote pair
read-cache.c: fix index memory allocation
make the sample pre-commit hook script reject names with newlines, too
Reindent closing bracket using tab instead of spaces
Git 1.7.7.1
RelNotes/1.7.7.1: setgid bit patch is about fixing "git init" via Makefile setting
gitweb: fix regression when filtering out forks
Almost ready for 1.7.7.1
pack-objects: don't traverse objects unnecessarily
...
Conflicts:
imap-send.c
Diffstat (limited to 't/t0004-unwritable.sh')
| -rwxr-xr-x | t/t0004-unwritable.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/t/t0004-unwritable.sh b/t/t0004-unwritable.sh new file mode 100755 index 0000000000..e3137d638e --- /dev/null +++ b/t/t0004-unwritable.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +test_description='detect unwritable repository and fail correctly' + +. ./test-lib.sh + +test_expect_success setup ' + + >file && + git add file && + test_tick && + git commit -m initial && + echo >file && + git add file + +' + +test_expect_success POSIXPERM,SANITY 'write-tree should notice unwritable repository' ' + 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' ' + 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' ' + 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' ' + 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 |
