Skip to content

Commit 7c73579

Browse files
committed
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
2 parents a38d39a + 35c194d commit 7c73579

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

t/t1509-root-work-tree.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ test_expect_success 'setup' '
221221
rm -rf /.git &&
222222
echo "Initialized empty Git repository in /.git/" > expected &&
223223
git init > result &&
224-
test_cmp expected result
224+
test_cmp expected result &&
225+
git config --global --add safe.directory /
225226
'
226227

227228
test_vars 'auto gitdir, root' ".git" "/" ""
@@ -242,7 +243,7 @@ say "auto bare gitdir"
242243
# DESTROYYYYY!!!!!
243244
test_expect_success 'setup' '
244245
rm -rf /refs /objects /info /hooks &&
245-
rm -f /expected /ls.expected /me /result &&
246+
rm -f /HEAD /expected /ls.expected /me /result &&
246247
cd / &&
247248
echo "Initialized empty Git repository in /" > expected &&
248249
git init --bare > result &&
@@ -255,4 +256,9 @@ test_expect_success 'go to /foo' 'cd /foo'
255256

256257
test_vars 'auto gitdir, root' "/" "" ""
257258

259+
test_expect_success 'cleanup root' '
260+
rm -rf /.git /refs /objects /info /hooks /branches /foo &&
261+
rm -f /HEAD /config /description /expected /ls.expected /me /result
262+
'
263+
258264
test_done

0 commit comments

Comments
 (0)