mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-27 00:51:18 +02:00
Fix pull rebase tests
It seems that older git versions would drop empty commits when rebasing. Since this aspect is not relevant to what we're testing here, fix this by simply avoiding empty commits in these tests.
This commit is contained in:
@ -15,14 +15,16 @@ var PullRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.Commit("one")
|
||||
shell.UpdateFileAndAdd("file", "content2")
|
||||
shell.Commit("two")
|
||||
shell.EmptyCommit("three")
|
||||
shell.CreateFileAndAdd("file3", "content3")
|
||||
shell.Commit("three")
|
||||
|
||||
shell.CloneIntoRemote("origin")
|
||||
|
||||
shell.SetBranchUpstream("master", "origin/master")
|
||||
|
||||
shell.HardReset("HEAD^^")
|
||||
shell.EmptyCommit("four")
|
||||
shell.CreateFileAndAdd("file4", "content4")
|
||||
shell.Commit("four")
|
||||
|
||||
shell.SetConfig("pull.rebase", "true")
|
||||
},
|
||||
|
@ -15,7 +15,8 @@ var PullRebaseInteractiveConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.Commit("one")
|
||||
shell.UpdateFileAndAdd("file", "content2")
|
||||
shell.Commit("two")
|
||||
shell.EmptyCommit("three")
|
||||
shell.CreateFileAndAdd("file3", "content3")
|
||||
shell.Commit("three")
|
||||
|
||||
shell.CloneIntoRemote("origin")
|
||||
|
||||
@ -24,7 +25,8 @@ var PullRebaseInteractiveConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.HardReset("HEAD^^")
|
||||
shell.UpdateFileAndAdd("file", "content4")
|
||||
shell.Commit("four")
|
||||
shell.EmptyCommit("five")
|
||||
shell.CreateFileAndAdd("file5", "content5")
|
||||
shell.Commit("five")
|
||||
|
||||
shell.SetConfig("pull.rebase", "interactive")
|
||||
},
|
||||
|
@ -15,7 +15,8 @@ var PullRebaseInteractiveConflictDrop = NewIntegrationTest(NewIntegrationTestArg
|
||||
shell.Commit("one")
|
||||
shell.UpdateFileAndAdd("file", "content2")
|
||||
shell.Commit("two")
|
||||
shell.EmptyCommit("three")
|
||||
shell.CreateFileAndAdd("file3", "content3")
|
||||
shell.Commit("three")
|
||||
|
||||
shell.CloneIntoRemote("origin")
|
||||
|
||||
@ -24,7 +25,8 @@ var PullRebaseInteractiveConflictDrop = NewIntegrationTest(NewIntegrationTestArg
|
||||
shell.HardReset("HEAD^^")
|
||||
shell.UpdateFileAndAdd("file", "content4")
|
||||
shell.Commit("four")
|
||||
shell.EmptyCommit("five")
|
||||
shell.CreateFileAndAdd("fil5", "content5")
|
||||
shell.Commit("five")
|
||||
|
||||
shell.SetConfig("pull.rebase", "interactive")
|
||||
},
|
||||
|
Reference in New Issue
Block a user