Skip to contentSkip to conversation

t0001: don't let a default ACL interfere with the umask test

PATCH In review Matt McCutchen 2 participants 2 messages Jan 28, 2017 – Jan 31, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t0001: don't let a default ACL interfere with the umask test

The "init creates a new deep directory (umask vs. shared)" test expects the permissions of newly created files to be based on the umask, which fails if a default ACL is inherited from the working tree for git. So attempt to remove a default ACL if there is one. Same idea as 8ed0a740dd42bd0724aebed6e3b07c4ea2a2d5e8. (I guess I'm the only one who ever runs the test suite with a default ACL set.)

---
 t/t0001-init.sh | 3 +++
 1 file changed, 3 insertions(+)
t/t0001-init.sh +3 -0
index b8fc588..e424de5 100755
@@ -258,6 +258,9 @@ test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shar
 	(
 		# Leading directories should honor umask while
 		# the repository itself should follow "shared"
+		mkdir newdir &&
+		# Remove a default ACL if possible.
+		(setfacl -k newdir 2>/dev/null || true) &&
 		umask 002 &&
 		git init --bare --shared=0660 newdir/a/b/c &&
 		test_path_is_dir newdir/a/b/c/refs &&
Signature · 1 line
2.9.3
#1 lore raw
Quoted 6 lines · Matt McCutchen

The "init creates a new deep directory (umask vs. shared)" test expects the permissions of newly created files to be based on the umask, which fails if a default ACL is inherited from the working tree for git. So attempt to remove a default ACL if there is one. Same idea as 8ed0a740dd42bd0724aebed6e3b07c4ea2a2d5e8. (I guess I'm the only one who ever runs the test suite with a default ACL set.)

Thanks--people with such a configuration who run tests are valuable ;-)