mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Inline afterRevertCommit
It's only called from one place now, so there's no reason not to inline it.
This commit is contained in:
parent
f14a3cdd46
commit
1c91999f61
1 changed files with 4 additions and 8 deletions
|
@ -872,7 +872,10 @@ func (self *LocalCommitsController) revert(commit *models.Commit) error {
|
|||
if err := self.c.Helpers().MergeAndRebase.CheckMergeOrRebase(result); err != nil {
|
||||
return err
|
||||
}
|
||||
return self.afterRevertCommit()
|
||||
self.context().MoveSelection(1)
|
||||
return self.c.Refresh(types.RefreshOptions{
|
||||
Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS, types.BRANCHES},
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
|
@ -880,13 +883,6 @@ func (self *LocalCommitsController) revert(commit *models.Commit) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) afterRevertCommit() error {
|
||||
self.context().MoveSelection(1)
|
||||
return self.c.Refresh(types.RefreshOptions{
|
||||
Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS, types.BRANCHES},
|
||||
})
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) error {
|
||||
var disabledReasonWhenFilesAreNeeded *types.DisabledReason
|
||||
if len(self.c.Model().Files) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue