mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02: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:
parent
a304fed68c
commit
860a8d102b
3 changed files with 78 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue