@@ -59,7 +59,7 @@ test_expect_success 'gitdir - .git directory in cwd' '
5959'
6060
6161test_expect_success ' gitdir - .git directory in parent' '
62- echo "$TRASH_DIRECTORY /.git" > expected &&
62+ echo "$(pwd -P) /.git" > expected &&
6363 (
6464 cd subdir/subsubdir &&
6565 __gitdir > "$actual"
@@ -77,7 +77,7 @@ test_expect_success 'gitdir - cwd is a .git directory' '
7777'
7878
7979test_expect_success ' gitdir - parent is a .git directory' '
80- echo "$TRASH_DIRECTORY /.git" > expected &&
80+ echo "$(pwd -P) /.git" > expected &&
8181 (
8282 cd .git/refs/heads &&
8383 __gitdir > "$actual"
@@ -115,7 +115,7 @@ test_expect_success 'gitdir - non-existing $GIT_DIR' '
115115'
116116
117117test_expect_success ' gitdir - gitfile in cwd' '
118- echo "$TRASH_DIRECTORY /otherrepo/.git" > expected &&
118+ echo "$(pwd -P) /otherrepo/.git" > expected &&
119119 echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&
120120 test_when_finished "rm -f subdir/.git" &&
121121 (
@@ -126,7 +126,7 @@ test_expect_success 'gitdir - gitfile in cwd' '
126126'
127127
128128test_expect_success ' gitdir - gitfile in parent' '
129- echo "$TRASH_DIRECTORY /otherrepo/.git" > expected &&
129+ echo "$(pwd -P) /otherrepo/.git" > expected &&
130130 echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&
131131 test_when_finished "rm -f subdir/.git" &&
132132 (
@@ -137,7 +137,7 @@ test_expect_success 'gitdir - gitfile in parent' '
137137'
138138
139139test_expect_success SYMLINKS ' gitdir - resulting path avoids symlinks' '
140- echo "$TRASH_DIRECTORY /otherrepo/.git" > expected &&
140+ echo "$(pwd -P) /otherrepo/.git" > expected &&
141141 mkdir otherrepo/dir &&
142142 test_when_finished "rm -rf otherrepo/dir" &&
143143 ln -s otherrepo/dir link &&
0 commit comments