Thread (32 messages) flat view 32 messages, 7 authors, 2021-09-07

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

From: Carlo Arenas <hidden>
Date: 2021-08-20 03:19:15

On Thu, Aug 19, 2021 at 12:25 PM Taylor Blau [off-list ref] wrote:
On Thu, Aug 19, 2021 at 05:16:35PM +0000, Philippe Blain via GitGitGadget wrote:
quoted
Signed-off-by: Philippe Blain <redacted>
---
 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)
instead of changing $HOME the needed dot files could be as well linked
into the current $HOME.
this will of course need extra code and specific knowledge of the
debugger that was invoked but will be IMHO safer and accomplish the
same objective.

Carlo

PS. I remember once wondering what GIT_DEBUGGER=1 meant and how it was
meant to be used, AFAIK that and the first use case were always broken
otherwise, maybe someone who knows and uses this code better could
chime in.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help