]> git.ipfire.org Git - thirdparty/git.git/commit
mingw: help debugging by optionally executing bash with strace
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 9 Apr 2020 10:21:47 +0000 (10:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Apr 2020 17:21:07 +0000 (10:21 -0700)
commit3efc128cd59fefb6aa159548d0cf7666ce5e34a9
treed8322852c4b56639b4d3366026d07ee1656be8e8
parentb6852e19794245566f7c961a434c56ca3b7a883b
mingw: help debugging by optionally executing bash with strace

MSYS2's strace facility is very useful for debugging... With this patch,
the bash will be executed through strace if the environment variable
GIT_STRACE_COMMANDS is set, which comes in real handy when investigating
issues in the test suite.

Also support passing a path to a log file via GIT_STRACE_COMMANDS to
force Git to call strace.exe with the `-o <path>` argument, i.e. to log
into a file rather than print the log directly.

That comes in handy when the output would otherwise misinterpreted by a
calling process as part of Git's output.

Note: the values "1", "yes" or "true" are *not* specifying paths, but
tell Git to let strace.exe log directly to the console.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c