Closed gchazot closed 4 years ago
Fixes #258
The problem is that repo.commits as an array is not necessarily ordered by parent commits. So repo.commits[1] could virtually be any commit in the repo. As an exemple, here is what I get:
repo.commits
repo.commits[1]
puts repo.commits[0].message puts repo.commits[1].message puts repo.commits[2].message
-> BEFORE rebase -i:
rebase -i
Initial commit First coommit Second commit
-> AFTER rebase -i and renaming the middle commit:
Second commit Initial commit First commit
This fix ensures that we look at the parent of the latest commit.
Thanks <3
Fixes #258
The problem is that
repo.commits
as an array is not necessarily ordered by parent commits. Sorepo.commits[1]
could virtually be any commit in the repo. As an exemple, here is what I get:-> BEFORE
rebase -i
:-> AFTER
rebase -i
and renaming the middle commit:This fix ensures that we look at the parent of the latest commit.