Re: Cygwin Git with Windows paths
- From
Steven Penny <svnpenn@gmail.com>
- Date
- Nov 18, 2018, 17:34 UTC
- Message-ID
- <CAAXzdLXmJ1YKiTF17b=ZfkM3HtJCNkvVMQNU=riW8R42VLid_Q@mail.gmail.com>
- In-Reply-To
- <20181118171525.GA25854@tor.lan>
On Sun, Nov 18, 2018 at 11:15 AM Torsten Bögershausen wrote:
Show 12 quoted lines
> 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_prefixand 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'