Skip to content

Commit da89885

Browse files
committed
Merge branch 'th/t9903-symlinked-workdir'
* th/t9903-symlinked-workdir: t9903: Don't fail when run from path accessed through symlink
2 parents e7e656c + 3ba40b4 commit da89885

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/t9903-bash-prompt.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test_expect_success 'gitdir - .git directory in cwd' '
5959
'
6060

6161
test_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

7979
test_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

117117
test_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

128128
test_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

139139
test_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

Comments
 (0)