mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Fix amend to operation not working with non-HEAD merge commit
This commit is contained in:
@ -284,7 +284,6 @@ func TestRebaseCommands_moveFixupCommitDown(t *testing.T) {
|
||||
expectedErr: nil,
|
||||
},
|
||||
{
|
||||
// TODO: is this something we actually want to support?
|
||||
name: "fixup commit is separated from original commit",
|
||||
todos: []todo.Todo{
|
||||
{Command: todo.Pick, Commit: "original"},
|
||||
@ -300,6 +299,22 @@ func TestRebaseCommands_moveFixupCommitDown(t *testing.T) {
|
||||
},
|
||||
expectedErr: nil,
|
||||
},
|
||||
{
|
||||
name: "fixup commit is separated from original merge commit",
|
||||
todos: []todo.Todo{
|
||||
{Command: todo.Merge, Commit: "original"},
|
||||
{Command: todo.Pick, Commit: "other"},
|
||||
{Command: todo.Pick, Commit: "fixup"},
|
||||
},
|
||||
originalHash: "original",
|
||||
fixupHash: "fixup",
|
||||
expectedTodos: []todo.Todo{
|
||||
{Command: todo.Merge, Commit: "original"},
|
||||
{Command: todo.Fixup, Commit: "fixup"},
|
||||
{Command: todo.Pick, Commit: "other"},
|
||||
},
|
||||
expectedErr: nil,
|
||||
},
|
||||
{
|
||||
name: "More original hashes than expected",
|
||||
todos: []todo.Todo{
|
||||
|
Reference in New Issue
Block a user