mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Add integration test for dropping a todo commit when there's an update-ref
The test shows how we are accidentally dropping the wrong commit in this case. We'll fix that in the next commit.
This commit is contained in:
@ -192,7 +192,11 @@ func (self *Shell) DeleteFileAndAdd(fileName string) *Shell {
|
||||
// The reason for padding with zeroes is so that it's easier to do string
|
||||
// matches on the commit messages when there are many of them
|
||||
func (self *Shell) CreateNCommits(n int) *Shell {
|
||||
for i := 1; i <= n; i++ {
|
||||
return self.CreateNCommitsStartingAt(n, 1)
|
||||
}
|
||||
|
||||
func (self *Shell) CreateNCommitsStartingAt(n, startIndex int) *Shell {
|
||||
for i := startIndex; i < startIndex+n; i++ {
|
||||
self.CreateFileAndAdd(
|
||||
fmt.Sprintf("file%02d.txt", i),
|
||||
fmt.Sprintf("file%02d content", i),
|
||||
|
Reference in New Issue
Block a user