Skip to content

Commit cc27c9e

Browse files
committed
fixup! t9902: mingw-specific fix for gitfile link files
1 parent 4afec75 commit cc27c9e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

t/t9902-completion.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,18 @@ test_expect_success '__gitdir - non-existing $GIT_DIR' '
212212
)
213213
'
214214

215+
function pwd_P_W () {
216+
if test_have_prereq MINGW
217+
then
218+
pwd -W
219+
else
220+
pwd -P
221+
fi
222+
}
223+
215224
test_expect_success '__gitdir - gitfile in cwd' '
216-
echo "$(pwd -W)/otherrepo/.git" >expected &&
217-
echo "gitdir: $(pwd -W)/otherrepo/.git" >subdir/.git &&
225+
echo "$(pwd_P_W)/otherrepo/.git" >expected &&
226+
echo "gitdir: $(pwd_P_W)/otherrepo/.git" >subdir/.git &&
218227
test_when_finished "rm -f subdir/.git" &&
219228
(
220229
cd subdir &&
@@ -224,8 +233,8 @@ test_expect_success '__gitdir - gitfile in cwd' '
224233
'
225234

226235
test_expect_success '__gitdir - gitfile in parent' '
227-
echo "$(pwd -W)/otherrepo/.git" >expected &&
228-
echo "gitdir: $(pwd -W)/otherrepo/.git" >subdir/.git &&
236+
echo "$(pwd_P_W)/otherrepo/.git" >expected &&
237+
echo "gitdir: $(pwd_P_W)/otherrepo/.git" >subdir/.git &&
229238
test_when_finished "rm -f subdir/.git" &&
230239
(
231240
cd subdir/subsubdir &&

0 commit comments

Comments
 (0)