1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

use selected branch as base when creating a new branch

This commit is contained in:
Jesse Duffield
2020-03-08 13:19:38 +11:00
parent e541b809ce
commit 19146d61b1
3 changed files with 9 additions and 6 deletions

View File

@ -636,12 +636,12 @@ func TestGitCommandNewBranch(t *testing.T) {
gitCmd := NewDummyGitCommand()
gitCmd.OSCommand.command = func(cmd string, args ...string) *exec.Cmd {
assert.EqualValues(t, "git", cmd)
assert.EqualValues(t, []string{"checkout", "-b", "test"}, args)
assert.EqualValues(t, []string{"checkout", "-b", "test", "master"}, args)
return exec.Command("echo")
}
assert.NoError(t, gitCmd.NewBranch("test"))
assert.NoError(t, gitCmd.NewBranch("test", "master"))
}
// TestGitCommandDeleteBranch is a function.