From: Johannes Schindelin Date: Thu, 28 Feb 2008 15:22:53 GMT Subject: Re: [PATCH 21/40] Windows: Disambiguate DOS style paths from SSH URLs. Message-ID: In-Reply-To: <1204138503-6126-22-git-send-email-johannes.sixt@telecom.at> Hi, On Wed, 27 Feb 2008, Johannes Sixt wrote: > 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