Re: [PATCH 5/6] t9902: mingw-specific fix for gitfile link files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 17, 2014, 20:42 UTC
- Message-ID
- <xmqqtx6fogy3.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1405611425-10009-6-git-send-email-kasal@ucw.cz>
Stepan Kasal <kasal@ucw.cz> writes:
Show 5 quoted lines
> From: Pat Thoyts <patthoyts@users.sourceforge.net> > > 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 /.
OK. We seem to have uses of "pwd -P" in other tests; don't they need a similar treatment, and if not why not?
Show 47 quoted lines
>
> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> Signed-off-by: Stepan Kasal <kasal@ucw.cz>
> ---
> t/t9902-completion.sh | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
> index 1d1c106..f10a752 100755
> --- a/t/t9902-completion.sh
> +++ b/t/t9902-completion.sh
> @@ -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' '
> - echo "$(pwd -P)/otherrepo/.git" >expected &&
> - echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" >subdir/.git &&
> + echo "$(pwd_P_W)/otherrepo/.git" >expected &&
> + echo "gitdir: $(pwd_P_W)/otherrepo/.git" >subdir/.git &&
> test_when_finished "rm -f subdir/.git" &&
> (
> cd subdir &&
> @@ -224,8 +233,8 @@ test_expect_success '__gitdir - gitfile in cwd' '
> '
>
> test_expect_success '__gitdir - gitfile in parent' '
> - echo "$(pwd -P)/otherrepo/.git" >expected &&
> - echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" >subdir/.git &&
> + echo "$(pwd_P_W)/otherrepo/.git" >expected &&
> + echo "gitdir: $(pwd_P_W)/otherrepo/.git" >subdir/.git &&
> test_when_finished "rm -f subdir/.git" &&
> (
> cd subdir/subsubdir &&
> --
> 2.0.0.9635.g0be03cb
>
> -- -- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "msysGit" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.