[PATCH v2 2/2] t0001-init: split the existence test from the permission test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The test for correct permissions after init created a deep directory
must be guarded by POSIXPERM. But testing that the deep dirctory exists
is good even on platforms that do not provide the POSIXPERM prerequiste.

Signed-off-by: Johannes Sixt <j6t@xxxxxxxx>
---
 Sorry, the first version was the result of mindless copying. This version
 removes the sub-shell (parentheses).

 -- Hannes

 t/t0001-init.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 07e011d..5386504 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -244,6 +244,12 @@ test_expect_success 'init recreates a new bare directory' '

 test_expect_success 'init creates a new deep directory' '
 	rm -fr newdir &&
+	git init newdir/a/b/c &&
+	test -d newdir/a/b/c/.git/refs
+'
+
+test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shared)' '
+	rm -fr newdir &&
 	(
 		# Leading directories should honor umask while
 		# the repository itself should follow "shared"
--
1.6.4.1186.g1d9a

	
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]