git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] test: mergetool: unset environment variable

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 13, 2023, 15:27 UTC
Message-ID
<20230513152734.3275192-1-felipe.contreras@gmail.com>

Since a regression in vimdiff I wrote my own tool and set MERGE_TOOLS_DIR to use that tool, and ever since then these tests fail.

I've been manually unsetting this variable to run the test suite, but this is something the testing framework should do.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 t/t7610-mergetool.sh | 2 ++
 t/t7800-difftool.sh  | 2 ++
 2 files changed, 4 insertions(+)
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 22b3a85b3e..cc99c29c81 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -12,6 +12,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 
+unset MERGE_TOOLS_DIR
+
 # All the mergetool test work by checking out a temporary branch based
 # off 'branch1' and then merging in main and checking the results of
 # running mergetool
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 59d3847bf8..d78a7ee90b 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -13,6 +13,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 
+unset MERGE_TOOLS_DIR
+
 difftool_test_setup ()
 {
 	test_config diff.tool test-tool &&
-- 
2.40.0+fc1
Message 1 of 1 in “test: mergetool: unset environment variable”
  1. test: mergetool: unset environment variableFelipe Contreras, May 13, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.