# [PATCH] t0001: don't let a default ACL interfere with the umask test

2 messages from 2017-01-28 to 2017-01-31. Participants: Matt McCutchen, Junio C Hamano.
Thread: https://gitlist.dev/t/44993

## Matt McCutchen, 2017-01-28 20:25

Subject: [PATCH] t0001: don't let a default ACL interfere with the umask test
Message-ID: <1485636766.2482.3.camel@mattmccutchen.net>
URL: https://gitlist.dev/e/1485636766.2482.3.camel%40mattmccutchen.net

```
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>
---
 t/t0001-init.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index b8fc588..e424de5 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -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 &&
-- 
2.9.3



```

## Junio C Hamano, 2017-01-31 17:13

Subject: Re: [PATCH] t0001: don't let a default ACL interfere with the umask test
Message-ID: <xmqq37fzrw3o.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqq37fzrw3o.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <1485636766.2482.3.camel@mattmccutchen.net>

```
Matt McCutchen <matt@mattmccutchen.net> writes:

> 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 ;-)

```
