summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-06-25 14:49:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-25 17:46:58 (GMT)
commitf6a6393771b1f9676f6c019b6e9d35ef172a79e9 (patch)
tree0a05a32c88ce4f6351c0874eda70da1a65b4311b /compat
parent446df60367be5f3a97f7bac12071878d1fdbebd2 (diff)
downloadgit-f6a6393771b1f9676f6c019b6e9d35ef172a79e9.zip
git-f6a6393771b1f9676f6c019b6e9d35ef172a79e9.tar.gz
git-f6a6393771b1f9676f6c019b6e9d35ef172a79e9.tar.bz2
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>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index d01e88c..4338383 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -2437,6 +2437,10 @@ int wmain(int argc, const wchar_t **wargv)
trace2_initialize_clock();
#ifdef _MSC_VER
+#ifdef _DEBUG
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+#endif
+
#ifdef USE_MSVC_CRTDBG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif