summaryrefslogtreecommitdiff
path: root/t/t5618-alternate-refs.sh
diff options
context:
space:
mode:
authorLibravatar Philippe Blain <levraiphilippeblain@gmail.com>2021-09-06 04:39:00 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-07 10:53:39 -0700
commit01c381037c30e9351e439d367983f88bdd3415ba (patch)
treebf58c665559e7ee7939c484cbfe49135c421d473 /t/t5618-alternate-refs.sh
parenttest-lib-functions: optionally keep HOME, TERM and SHELL in 'test_pause' (diff)
downloadtgif-01c381037c30e9351e439d367983f88bdd3415ba.tar.xz
test-lib-functions: keep user's debugger config files and TERM in 'debug'
The 'debug' function in test-lib-functions.sh is used to invoke a debugger at a specific line in a test. It inherits the value of HOME and TERM set by 'test-lib.sh': HOME="$TRASH_DIRECTORY" and TERM=dumb. Changing the value of HOME means that any customization configured in a developers' debugger configuration file (like $HOME/.gdbinit or $HOME/.lldbinit) are not available in the debugger invoked by 'test_pause'. Changing the value of TERM to 'dumb' means that colored output is disabled in the debugger. To make the debugging experience with 'debug' more pleasant, leverage the variable USER_HOME, added in the previous commit, to copy a developer's ~/.gdbinit and ~/.lldbinit to the test HOME. We do not set HOME to USER_HOME as in 'test_pause' to avoid user configuration in $USER_HOME/.gitconfig from interfering with the command being debugged. Also, add a flag to launch the debugger with the original value of TERM, and add the same warning as for 'test_pause'. Helped-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5618-alternate-refs.sh')
0 files changed, 0 insertions, 0 deletions