From 3b1f65e46d8aac6d5b8f5cbab421b514082e0b9e Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 31 Jul 2025 13:45:16 -0700 Subject: [PATCH] fix(tests): specify initial branch when initializing git repository Git may complain if init.defaultBranch is not set up on the system: hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" Use "git init -m main" to suppress this message. --- tests/llm_tools_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/llm_tools_spec.lua b/tests/llm_tools_spec.lua index 7f8c2ba..a8761fc 100644 --- a/tests/llm_tools_spec.lua +++ b/tests/llm_tools_spec.lua @@ -20,7 +20,7 @@ describe("llm_tools", function() Config.setup() -- 创建测试目录和文件 os.execute("mkdir -p " .. test_dir) - os.execute(string.format("cd %s; git init", test_dir)) + os.execute(string.format("cd %s; git init -b main", test_dir)) local file = io.open(test_file, "w") if not file then error("Failed to create test file") end file:write("test content")