aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-16 12:07:45 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-16 12:07:45 -0800
commit7c7357910ba61018e215037e432e697fad239d53 (patch)
tree8a3fcb4c7d8c3cfd3da67793cfd444ff4d9ad662
parenta38d39a4c50d1275833aba54c4dbdfce9e2e9ca1 (diff)
parent35c194dc57fc0cfe1381aab2b45d9588766242e1 (diff)
downloadgit-7c7357910ba61018e215037e432e697fad239d53.tar.xz
Merge branch 'es/t1509-root-fixes'
Test fixes. * es/t1509-root-fixes: t1509: facilitate repeated script invocations t1509: make "setup" test more robust t1509: fix failing "root work tree" test due to owner-check
-rwxr-xr-xt/t1509-root-work-tree.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/t1509-root-work-tree.sh b/t/t1509-root-work-tree.sh
index 553a3f601b..c799f5b6ac 100755
--- a/t/t1509-root-work-tree.sh
+++ b/t/t1509-root-work-tree.sh
@@ -221,7 +221,8 @@ test_expect_success 'setup' '
rm -rf /.git &&
echo "Initialized empty Git repository in /.git/" > expected &&
git init > result &&
- test_cmp expected result
+ test_cmp expected result &&
+ git config --global --add safe.directory /
'
test_vars 'auto gitdir, root' ".git" "/" ""
@@ -242,7 +243,7 @@ say "auto bare gitdir"
# DESTROYYYYY!!!!!
test_expect_success 'setup' '
rm -rf /refs /objects /info /hooks &&
- rm -f /expected /ls.expected /me /result &&
+ rm -f /HEAD /expected /ls.expected /me /result &&
cd / &&
echo "Initialized empty Git repository in /" > expected &&
git init --bare > result &&
@@ -255,4 +256,9 @@ test_expect_success 'go to /foo' 'cd /foo'
test_vars 'auto gitdir, root' "/" "" ""
+test_expect_success 'cleanup root' '
+ rm -rf /.git /refs /objects /info /hooks /branches /foo &&
+ rm -f /HEAD /config /description /expected /ls.expected /me /result
+'
+
test_done