aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-17 21:42:12 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-17 21:42:12 -0700
commit1dd9b638c1c46f1bd71cf48bad2cdf78d54cd858 (patch)
tree542e74a6f7aef86693f07de0d1b9bdb3242ddc76 /t
parent1ee28e58d576bf15c1efce4b9a92df9b893b3bc0 (diff)
parent7d5a1806e8c2d9980938a05a56939272ad2ec338 (diff)
downloadgit-1dd9b638c1c46f1bd71cf48bad2cdf78d54cd858.tar.gz
git-1dd9b638c1c46f1bd71cf48bad2cdf78d54cd858.tar.xz
Merge branch 'jc/shared-literally'
* jc/shared-literally: t1301-shared-repo: fix forced modes test
Diffstat (limited to 't')
-rwxr-xr-xt/t1301-shared-repo.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index 750fbb32e..de42d21c9 100755
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
@@ -126,7 +126,7 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
esac
'
-test_expect_success 'forced modes' '
+test_expect_success POSIXPERM 'forced modes' '
mkdir -p templates/hooks &&
echo update-server-info >templates/hooks/post-update &&
chmod +x templates/hooks/post-update &&
@@ -141,11 +141,14 @@ test_expect_success 'forced modes' '
git commit -a -m initial &&
git repack
) &&
- find new/.git -print |
+ # List repository files meant to be protected; note that
+ # COMMIT_EDITMSG does not matter---0mode is not about a
+ # repository with a work tree.
+ find new/.git -type f -name COMMIT_EDITMSG -prune -o -print |
xargs ls -ld >actual &&
# Everything must be unaccessible to others
- test -z "$(sed -n -e "/^.......---/d" actual)" &&
+ test -z "$(sed -e "/^.......---/d" actual)" &&
# All directories must have either 2770 or 770
test -z "$(sed -n -e "/^drwxrw[sx]---/d" -e "/^d/p" actual)" &&
@@ -156,10 +159,11 @@ test_expect_success 'forced modes' '
p
}" actual)" &&
- # All files inside objects must be 0440
+ # All files inside objects must be accessible by us
test -z "$(sed -n -e "/objects\//{
/^d/d
- /^-r--r-----/d
+ /^-r.-r.----/d
+ p
}" actual)"
'