1 #include "../git-compat-util.h"
4 int cygwin_offset_1st_component(const char *path
)
6 const char *pos
= path
;
8 if (is_dir_sep(pos
[0]) && is_dir_sep(pos
[1])) {
10 pos
= strchr(pos
+ 2, '/');
12 return 0; /* Error: malformed unc path */
16 } while (*pos
&& pos
[0] != '/');
18 return pos
+ is_dir_sep(*pos
) - path
;