@@ -59,7 +59,7 @@ test_expect_success 'gitdir - .git directory in cwd' '
59
59
'
60
60
61
61
test_expect_success ' gitdir - .git directory in parent' '
62
- echo "$TRASH_DIRECTORY /.git" > expected &&
62
+ echo "$(pwd -P) /.git" > expected &&
63
63
(
64
64
cd subdir/subsubdir &&
65
65
__gitdir > "$actual"
@@ -77,7 +77,7 @@ test_expect_success 'gitdir - cwd is a .git directory' '
77
77
'
78
78
79
79
test_expect_success ' gitdir - parent is a .git directory' '
80
- echo "$TRASH_DIRECTORY /.git" > expected &&
80
+ echo "$(pwd -P) /.git" > expected &&
81
81
(
82
82
cd .git/refs/heads &&
83
83
__gitdir > "$actual"
@@ -115,7 +115,7 @@ test_expect_success 'gitdir - non-existing $GIT_DIR' '
115
115
'
116
116
117
117
test_expect_success ' gitdir - gitfile in cwd' '
118
- echo "$TRASH_DIRECTORY /otherrepo/.git" > expected &&
118
+ echo "$(pwd -P) /otherrepo/.git" > expected &&
119
119
echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&
120
120
test_when_finished "rm -f subdir/.git" &&
121
121
(
@@ -126,7 +126,7 @@ test_expect_success 'gitdir - gitfile in cwd' '
126
126
'
127
127
128
128
test_expect_success ' gitdir - gitfile in parent' '
129
- echo "$TRASH_DIRECTORY /otherrepo/.git" > expected &&
129
+ echo "$(pwd -P) /otherrepo/.git" > expected &&
130
130
echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&
131
131
test_when_finished "rm -f subdir/.git" &&
132
132
(
@@ -137,7 +137,7 @@ test_expect_success 'gitdir - gitfile in parent' '
137
137
'
138
138
139
139
test_expect_success SYMLINKS ' gitdir - resulting path avoids symlinks' '
140
- echo "$TRASH_DIRECTORY /otherrepo/.git" > expected &&
140
+ echo "$(pwd -P) /otherrepo/.git" > expected &&
141
141
mkdir otherrepo/dir &&
142
142
test_when_finished "rm -rf otherrepo/dir" &&
143
143
ln -s otherrepo/dir link &&
0 commit comments