Revision 3edd98ac6569252acd669c2b9cbe39d15eeb7e56 authored by Carlos R. Mafra on 11 October 2009, 13:32:19 UTC, committed by Junio C Hamano on 19 October 2009, 02:45:38 UTC
'make clean' should remove the object files from block-sha1/
instead of the non-existent mozilla-sha1/ directory.

Signed-off-by: Carlos R. Mafra <crmafra@aei.mpg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent b142da2
Raw File
t0004-unwritable.sh
#!/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 '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_expect_success POSIXPERM '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_expect_success POSIXPERM '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_expect_success POSIXPERM '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_done
back to top