Subject: Re: [PATCH 2/2] test-lib-functions: use user's TERM and HOME for 'debug'

From: Taylor Blau <[email-masked]>
Date: Thu, 19 Aug 2021 15:24:39 -0400

On Thu, Aug 19, 2021 at 05:16:35PM +0000, Philippe Blain via GitGitGadget wrote:
> Signed-off-by: Philippe Blain <[email-masked]>
> ---
>  t/test-lib-functions.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> index 662cfc4c3e0..86680b1177d 100644
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -163,7 +163,7 @@ debug () {
>  		GIT_DEBUGGER=1
>  		;;
>  	esac &&
> -	GIT_DEBUGGER="${GIT_DEBUGGER}" "$@" <&6 >&5 2>&7
> +	TERM="$USER_TERM" HOME="$USER_HOME" GIT_DEBUGGER="${GIT_DEBUGGER}" "$@" <&6 >&5 2>&7

I also share some concerns about setting $HOME here (though less than in
test_pause), but forwarding $USER_TERM down would be so nice. I have a
muscle memory of 'tui enable' for anything besides absolutely trivial
debugging, and it's always so frustrating to see:

    (gdb) tui enable
    Cannot enable the TUI: terminal doesn't support cursor addressing [TERM=dumb]

So I would welcome even just that part of this change.

Thanks,
Taylor