Subject: Re: Cygwin Git with Windows paths

From: Torsten Bögershausen <[email-masked]>
Date: Sun, 18 Nov 2018 19:28:47 +0100

On Sun, Nov 18, 2018 at 11:34:04AM -0600, Steven Penny wrote:
> On Sun, Nov 18, 2018 at 11:15 AM Torsten Bögershausen wrote:
> > But it may be that we need to pull in more stuff, similar to mingw,
> > to get the C: stuff working, see
> > "skip_dos_drive_prefix"
> >
> > And it may even be that we need a special handling for the "\" to be treated
> > as "/".
> >
> > If you implement "skip_dos_drive_prefix" similar to mingw,
> > (rename mingw into cygwin) does
> >
> > git clone <source> C:/my/dir/
> > work ?
> 
> I added this to "compat/cygwin.h":
> 
>     #define has_dos_drive_prefix(path) \
>       (isalpha(*(path)) && (path)[1] == ':' ? 2 : 0)
>     int mingw_skip_dos_drive_prefix(char **path);
>     #define skip_dos_drive_prefix mingw_skip_dos_drive_prefix
> 
> and added this to "compat/cygwin.c":
> 
>     int mingw_skip_dos_drive_prefix(char **path) {
>       int ret = has_dos_drive_prefix(*path);
>       *path += ret;
>       return ret;
>     }
> 
> but still, these dont work:
> 
>     git clone <source> C:/my/dir
>     git clone <source> 'C:\my\dir'

Thanks for testing.
It looks as if there is more work to be done then just a simple patch.

My last question for today:
Does 

git clone <source> '/cgdrive/c/my/dir'

work ?