From: Junio C Hamano Date: Thu, 30 Jun 2011 00:09:17 +0000 (-0700) Subject: Merge branch 'ef/maint-win-verify-path' X-Git-Tag: v1.7.7-rc0~117 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=033c2dc4364042b9e6dbd44e82e1974f78a72567;p=git.git Merge branch 'ef/maint-win-verify-path' * ef/maint-win-verify-path: verify_dotfile(): do not assume '/' is the path seperator verify_path(): simplify check at the directory boundary verify_path: consider dos drive prefix real_path: do not assume '/' is the path seperator A Windows path starting with a backslash is absolute --- 033c2dc4364042b9e6dbd44e82e1974f78a72567 diff --cc cache.h index e11cf6ab1,9d3d92cf9..f4bb43ec6 --- a/cache.h +++ b/cache.h @@@ -747,12 -715,12 +747,12 @@@ extern char *expand_user_path(const cha char *enter_repo(char *path, int strict); static inline int is_absolute_path(const char *path) { - return path[0] == '/' || has_dos_drive_prefix(path); + return is_dir_sep(path[0]) || has_dos_drive_prefix(path); } int is_directory(const char *); -const char *make_absolute_path(const char *path); -const char *make_nonrelative_path(const char *path); -const char *make_relative_path(const char *abs, const char *base); +const char *real_path(const char *path); +const char *absolute_path(const char *path); +const char *relative_path(const char *abs, const char *base); int normalize_path_copy(char *dst, const char *src); int longest_ancestor_length(const char *path, const char *prefix_list); char *strip_path_suffix(const char *path, const char *suffix);