Re: [PATCH 21/40] Windows: Disambiguate DOS style paths from SSH URLs.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 28, 2008, 15:22 UTC
- Message-ID
- <alpine.LSU.1.00.0802281522190.22527@racer.site>
- In-Reply-To
- <1204138503-6126-22-git-send-email-johannes.sixt@telecom.at>
Hi,
On Wed, 27 Feb 2008, Johannes Sixt wrote:
Show 16 quoted lines
> diff --git a/connect.c b/connect.c
> index 5ac3572..7e18ac8 100644
> --- a/connect.c
> +++ b/connect.c
> @@ -529,7 +529,13 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
> end = host;
>
> path = strchr(end, c);
> - if (path) {
> +#ifdef __MINGW32__
> + /* host must have at least 2 chars to catch DOS C:/path */
> + if (path && path - end > 1)
> +#else
> + if (path)
> +#endif
> + {This could be un-#ifdef'ed by using the has_dos_drive_prefix() function I suggested earlier.
Ciao, Dscho