t9902: mingw-specific fix for gitfile link files
The path in a .git platform independent link file needs to be absolute and under mingw we need it to be a windows type path, not a unix style path so it should start with a drive letter and not a /. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5212f91deb
commit
44cf1c0ef1
@ -212,9 +212,18 @@ test_expect_success '__gitdir - non-existing $GIT_DIR' '
|
|||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
function pwd_P_W () {
|
||||||
|
if test_have_prereq MINGW
|
||||||
|
then
|
||||||
|
pwd -W
|
||||||
|
else
|
||||||
|
pwd -P
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
test_expect_success '__gitdir - gitfile in cwd' '
|
test_expect_success '__gitdir - gitfile in cwd' '
|
||||||
echo "$(pwd -P)/otherrepo/.git" >expected &&
|
echo "$(pwd_P_W)/otherrepo/.git" >expected &&
|
||||||
echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" >subdir/.git &&
|
echo "gitdir: $(pwd_P_W)/otherrepo/.git" >subdir/.git &&
|
||||||
test_when_finished "rm -f subdir/.git" &&
|
test_when_finished "rm -f subdir/.git" &&
|
||||||
(
|
(
|
||||||
cd subdir &&
|
cd subdir &&
|
||||||
@ -224,8 +233,8 @@ test_expect_success '__gitdir - gitfile in cwd' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success '__gitdir - gitfile in parent' '
|
test_expect_success '__gitdir - gitfile in parent' '
|
||||||
echo "$(pwd -P)/otherrepo/.git" >expected &&
|
echo "$(pwd_P_W)/otherrepo/.git" >expected &&
|
||||||
echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" >subdir/.git &&
|
echo "gitdir: $(pwd_P_W)/otherrepo/.git" >subdir/.git &&
|
||||||
test_when_finished "rm -f subdir/.git" &&
|
test_when_finished "rm -f subdir/.git" &&
|
||||||
(
|
(
|
||||||
cd subdir/subsubdir &&
|
cd subdir/subsubdir &&
|
||||||
|
Loading…
Reference in New Issue
Block a user