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.) Signed-off-by: Matt McCutchen <matt@mattmccutchen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matt McCutchen committed
Jan 28, 2017 at 15:25 UTC
d549d21307d980aeaaca54fe540e6b726f99dca1
1 file changed
+3
t/t0001-init.sh
+3
@@ -258,6 +258,9 @@ test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shar
258
(
259
# Leading directories should honor umask while
260
# the repository itself should follow "shared"
261
+ mkdir newdir &&
262
+ # Remove a default ACL if possible.
263
+ (setfacl -k newdir 2>/dev/null || true) &&
264
umask 002 &&
265
git init --bare --shared=0660 newdir/a/b/c &&
266
test_path_is_dir newdir/a/b/c/refs &&