File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ test_expect_success 'shared = 0400 (faulty permission u-w)' '
2020 test $ret != "0"
2121'
2222
23+ modebits () {
24+ ls -l " $1 " | sed -e ' s|^\(..........\).*|\1|'
25+ }
26+
2327for u in 002 022
2428do
2529 test_expect_success " shared=1 does not clear bits preset by umask $u " '
8589
8690 rm -f .git/info/refs &&
8791 git update-server-info &&
88- actual="$(ls -l .git/info/refs)" &&
89- actual=${actual%% *} &&
92+ actual="$(modebits .git/info/refs)" &&
9093 test "x$actual" = "x-$y" || {
9194 ls -lt .git/info
9295 false
98101
99102 rm -f .git/info/refs &&
100103 git update-server-info &&
101- actual="$(ls -l .git/info/refs)" &&
102- actual=${actual%% *} &&
104+ actual="$(modebits .git/info/refs)" &&
103105 test "x$actual" = "x-$x" || {
104106 ls -lt .git/info
105107 false
You can’t perform that action at this time.
0 commit comments