Skip to content

Commit 1b89eaa

Browse files
peffgitster
authored andcommitted
t1301: loosen test for forced modes
One of the aspects of the test checked explicitly for the g+s bit to be set on created directories. However, this is only the means to an end (the "end" being having the correct group set). And in fact, on systems where DIR_HAS_BSD_GROUP_SEMANTICS is set, we do not even need to use this "means" at all, causing the test to fail. This patch removes that part of the test. In an ideal world it would be replaced by a test to check that the group was properly assigned, but that is difficult to automate because it requires the user running the test suite be a member of multiple groups. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 17e61b8 commit 1b89eaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1301-shared-repo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ test_expect_success 'forced modes' '
147147
# Everything must be unaccessible to others
148148
test -z "$(sed -n -e "/^.......---/d" actual)" &&
149149
150-
# All directories must have 2770
151-
test -z "$(sed -n -e "/^drwxrws---/d" -e "/^d/p" actual)" &&
150+
# All directories must have either 2770 or 770
151+
test -z "$(sed -n -e "/^drwxrw[sx]---/d" -e "/^d/p" actual)" &&
152152
153153
# post-update hook must be 0770
154154
test -z "$(sed -n -e "/post-update/{

0 commit comments

Comments
 (0)