Re: Cygwin Git with Windows paths
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Nov 18, 2018, 17:15 UTC
- Message-ID
- <20181118171525.GA25854@tor.lan>
- In-Reply-To
- <CAAXzdLXSJU5bC_D1Q_gCWqKG7mcdcAvRkiYzano-VsrRRxazDQ@mail.gmail.com>
On Sun, Nov 18, 2018 at 10:23:19AM -0600, Steven Penny wrote:
Show 10 quoted lines
> On Sun, Nov 18, 2018 at 9:41 AM Torsten Bögershausen wrote: > > Thanks for the report > > It seams as if "C:" is not recognized as an absolute path under > > cygwin. > > May be it should ? > > > > Does the following help ? (fully untested) > > that looks promising - but its not getting pulled in where it needs to be. > perhaps another file need to be modified to utilize that macro?
The macro should be utilized, see git-compat-util.h:
#if defined(__CYGWIN__) #include "compat/cygwin.h" #endif
And further down
#ifndef has_dos_drive_prefix
static inline int git_has_dos_drive_prefix(const char *path)
{
return 0;
}
#define has_dos_drive_prefix git_has_dos_drive_prefix
#endif#ifndef skip_dos_drive_prefix
static inline int git_skip_dos_drive_prefix(char **path)
{
return 0;
}
--------------------
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 ?
That would be a progress, I think.