diff options
author | Torsten Bögershausen <tboegi@web.de> | 2017-07-03 16:41:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-05 14:01:03 -0700 |
commit | 496f2569892273a142889193350ceb95b6019011 (patch) | |
tree | f071c3b1494dba4510bd63c410b906db791703b3 /git-compat-util.h | |
parent | 8c8e978f5719c6a58fb998742207bf907f963143 (diff) | |
download | git-496f2569892273a142889193350ceb95b6019011.tar.gz |
cygwin: allow pushing to UNC pathstb/push-to-cygwin-unc-path
cygwin can use an UNC path like //server/share/repo
$ cd //server/share/dir
$ mkdir test
$ cd test
$ git init --bare
However, when we try to push from a local Git repository to this repo,
there is a problem: Git converts the leading "//" into a single "/".
As cygwin handles an UNC path so well, Git can support them better:
- Introduce cygwin_offset_1st_component() which keeps the leading "//",
similar to what Git for Windows does.
- Move CYGWIN out of the POSIX in the tests for path normalization in t0060
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 199042ac91..59866d72fa 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -189,6 +189,9 @@ #include <sys/sysctl.h> #endif +#if defined(__CYGWIN__) +#include "compat/cygwin.h" +#endif #if defined(__MINGW32__) /* pull in Windows compatibility stuff */ #include "compat/mingw.h" |