mirror of
https://github.com/git/git.git
synced 2026-01-17 06:13:11 +00:00
MinGW: disable CRT command line globbing
MingwRT listens to _CRT_glob to decide if __getmainargs should perform globbing, with the default being that it should. Unfortunately, __getmainargs globbing is sub-par; for instance patterns like "*.c" will only match c-sources in the current directory. Disable __getmainargs' command line wildcard expansion, so these patterns will be left untouched, and handled by Git's superior built-in globbing instead. MSVC defaults to no globbing, so we don't need to do anything in that case. This fixes t5505 and t7810. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
This commit is contained in:
committed by
Johannes Schindelin
parent
1eccee6ac4
commit
7fa1d0823f
@@ -1876,6 +1876,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] */
|
||||
|
||||
Reference in New Issue
Block a user