1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-15 11:56:37 +02:00

Add a test that demonstrates a bug with multiple args in git.merging.args config

We are currently passing the whole string as a single argument, which doesn't
work of course.
This commit is contained in:
Stefan Haller 2024-02-23 15:27:25 +01:00
parent ee5533f9bf
commit aa81c456bb

View File

@ -127,6 +127,20 @@ func TestBranchMerge(t *testing.T) {
branchName: "mybranch",
expected: []string{"merge", "--no-edit", "--merging-args", "mybranch"},
},
{
testName: "multiple merging args",
userConfig: &config.UserConfig{
Git: config.GitConfig{
Merging: config.MergingConfig{
Args: "--arg1 --arg2", // it's up to the user what they put here
},
},
},
opts: MergeOpts{},
branchName: "mybranch",
expected: []string{"merge", "--no-edit", "--arg1 --arg2", "mybranch"},
// This is wrong, we want separate arguments for "--arg1" and "--arg2"
},
{
testName: "fast forward only",
userConfig: &config.UserConfig{},