aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-05 09:03:15 +0900
committerJunio C Hamano <gitster@pobox.com>2017-06-05 09:03:15 +0900
commite6f80aee299f530c9565b520aa76e6ff2e5649bc (patch)
treec66968077cfc4333c2fe703cdc090383d7a3711e /compat
parenta07148db319e8d0080ba2b7fc85501cd7bbba6b5 (diff)
parentd9244ecf4f109030e61b8fd52a799789133e2199 (diff)
downloadgit-e6f80aee299f530c9565b520aa76e6ff2e5649bc.tar.gz
git-e6f80aee299f530c9565b520aa76e6ff2e5649bc.tar.xz
Merge branch 'js/bs-is-a-dir-sep-on-windows' into maint
"foo\bar\baz" in "git fetch foo\bar\baz", even though there is no slashes in it, cannot be a nickname for a remote on Windows, as that is likely to be a pathname on a local filesystem. * js/bs-is-a-dir-sep-on-windows: Windows: do not treat a path with backslashes as a remote's nick name mingw.h: permit arguments with side effects for is_dir_sep
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 335016955..e03aecfe2 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -398,7 +398,11 @@ HANDLE winansi_get_osfhandle(int fd);
(isalpha(*(path)) && (path)[1] == ':' ? 2 : 0)
int mingw_skip_dos_drive_prefix(char **path);
#define skip_dos_drive_prefix mingw_skip_dos_drive_prefix
-#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
+static inline int mingw_is_dir_sep(int c)
+{
+ return c == '/' || c == '\\';
+}
+#define is_dir_sep mingw_is_dir_sep
static inline char *mingw_find_last_dir_sep(const char *path)
{
char *ret = NULL;