From aebf14733bed5cbde04c27c8751f59d9a796fae1 Mon Sep 17 00:00:00 2001 From: Karsten Blees Date: Fri, 7 Jan 2011 19:52:20 +0100 Subject: [PATCH] MinGW: disable command line globbing (fixes t5505 and t7810) Disable MSVCRT command line wildcard expansion to be able to pass * / ? to git-grep and friends. Signed-off-by: Karsten Blees --- compat/mingw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compat/mingw.c b/compat/mingw.c index b024944960..8e8a173854 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1815,6 +1815,12 @@ int mingw_offset_1st_component(const char *path) return offset + is_dir_sep(path[offset]); } +/* + * Disable MSVCRT command line wildcard expansion (__getmainargs called from + * mingw startup code, see init.c in mingw runtime). + */ +int _CRT_glob = 0; + void mingw_startup() { /* copy executable name to argv[0] */ -- 2.11.4.GIT