mirror of
https://github.com/git/git.git
synced 2026-02-04 06:53:10 +00:00
Merge pull request #286 from dscho/unc-alternates
Make alternates work on UNC paths
This commit is contained in:
@@ -399,6 +399,7 @@ HANDLE winansi_get_osfhandle(int fd);
|
||||
*/
|
||||
|
||||
#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
|
||||
#define has_unc_prefix(path) (*(path) == '\\' && (path)[1] == '\\')
|
||||
#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
|
||||
static inline char *mingw_find_last_dir_sep(const char *path)
|
||||
{
|
||||
|
||||
@@ -337,6 +337,14 @@ static inline int git_has_dos_drive_prefix(const char *path)
|
||||
#define has_dos_drive_prefix git_has_dos_drive_prefix
|
||||
#endif
|
||||
|
||||
#ifndef has_unc_prefix
|
||||
static inline int git_has_unc_prefix(const char *path)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#define has_unc_prefix git_has_unc_prefix
|
||||
#endif
|
||||
|
||||
#ifndef is_dir_sep
|
||||
static inline int git_is_dir_sep(int c)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user