msvc: avoid debug assertion windows in Debug Mode

For regular debugging, it is pretty helpful when a debug assertion in a running application triggers a window that offers to start the debugger. However, when running the test suite, it is not so helpful, in particular when the debug assertions are then suppressed anyway because we disable the invalid parameter checking (via invalidcontinue.obj, see the comment in config.mak.uname about that object for more information). So let's simply disable that window in Debug Mode (it is already disabled in Release Mode). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jun 25, 2019 at 07:49 UTC f6a6393771b1f9676f6c019b6e9d35ef172a79e9
1 file changed +4
compat/mingw.c
+4
@@ -2437,6 +2437,10 @@ int wmain(int argc, const wchar_t **wargv)
2437 trace2_initialize_clock();
2438
2439 #ifdef _MSC_VER
2440 +#ifdef _DEBUG
2441 + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
2442 +#endif
2443 +
2444 #ifdef USE_MSVC_CRTDBG
2445 _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
2446 #endif