summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2017-01-28 15:25:48 -0500
committerJunio C Hamano <gitster@pobox.com>2017-01-30 14:03:21 -0800
commitd549d21307d980aeaaca54fe540e6b726f99dca1 (patch)
tree48557a5f2f98d0e34b56942cbd74c2a77da7fb41
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
downloadgit-mm/reset-facl-before-umask-test.tar.gz
t0001: don't let a default ACL interfere with the umask testmm/reset-facl-before-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>
-rwxr-xr-xt/t0001-init.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index a6fdd5ef3a..7bfc69784d 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 &&