Windows: allow using UNC path for git repository
[efl: moved MinGW-specific part to compat/] [jes: fixed compilation on non-Windows] Eric Sunshine fixed mingw_offset_1st_component() to return consistently "foo" for UNC "//machine/share/foo", cf http://groups.google.com/group/msysgit/browse_thread/thread/c0af578549b5dda0 Author: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Cezary Zawadka <czawadka@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
eea591373e
commit
c2369bdf7f
@ -270,6 +270,10 @@ extern char *gitbasename(char *);
|
||||
#define has_dos_drive_prefix(path) 0
|
||||
#endif
|
||||
|
||||
#ifndef offset_1st_component
|
||||
#define offset_1st_component(path) (is_dir_sep((path)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef is_dir_sep
|
||||
#define is_dir_sep(c) ((c) == '/')
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user