From: Patrick Steinhardt Date: Tue, 21 Apr 2026 07:34:22 +0000 (+0200) Subject: t1301: don't fail in case setfacl(1) doesn't exist or fails X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=4f917bbf718047dc1b3c4346a9c47c84a52a810b;p=thirdparty%2Fgit.git t1301: don't fail in case setfacl(1) doesn't exist or fails In t1301 we're trying to remove any potentially-existing default ACLs that might exist on the transh directory by executing setfacl(1). According to 8ed0a740dd (t1301-shared-repo.sh: don't let a default ACL interfere with the test, 2008-10-16), this is done because we play around with permissions and umasks in this test suite. The setfacl(1) binary may not exist on some systems though, even though tests ultimately still pass. This doesn't matter currently, but will cause the test to fail once we start running with `set -e`. Silence such failures by ignoring failures here. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 630a47af21..0e0d07a1a1 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -12,7 +12,7 @@ TEST_CREATE_REPO_NO_TEMPLATE=1 . ./test-lib.sh # Remove a default ACL from the test dir if possible. -setfacl -k . 2>/dev/null +setfacl -k . 2>/dev/null || : # User must have read permissions to the repo -> failure on --shared=0400 test_expect_success 'shared = 0400 (faulty permission u-w)' '