Re: [PATCH RESEND] Git.pm: Always set Repository to absolute path if autodetecting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frank Lichtenheld schrieb:
> From: Frank Lichtenheld <flichtenheld@xxxxxxxxxx>
> 
> So far we only set it to absolute paths in some cases which lead
> to problems like wc_chdir not working.
> 
> Signed-off-by: Frank Lichtenheld <flichtenheld@xxxxxxxxxx>
> ---
>  perl/Git.pm     |    2 +-
>  t/t9700/test.pl |   10 ++--------
>  2 files changed, 3 insertions(+), 9 deletions(-)
> 
> Resent unchanged. There was one comment which I've reponded too and
> argued that it didn't apply and there was no further objections.
> 
> diff --git a/perl/Git.pm b/perl/Git.pm
> index 4313db7..e8df55d 100644
> --- a/perl/Git.pm
> +++ b/perl/Git.pm
> @@ -185,7 +185,7 @@ sub repository {
>  
>  		if ($dir) {
>  			$dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir;
> -			$opts{Repository} = $dir;
> +			$opts{Repository} = abs_path($dir);

Unfortunately, this change breaks MinGW git because the absolute path that
this produces is MSYS-style /c/path/to/repo, but git does not understand
this; it should be c:/path/to/repo. This value is ultimately assigned to
GIT_DIR, but the path name mangling that usually happens when an MSYS
program (like perl) spawns a non-MSYS program (like git) does not happen.

Your commit message is quite vague about the problems that you have seen.
I vote to revert this change.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]