Skip to content

Commit 4be417a

Browse files
committed
Inline afterRevertCommit
It's only called from one place now, so there's no reason not to inline it.
1 parent 06581e1 commit 4be417a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: pkg/gui/controllers/local_commits_controller.go

+4-8
Original file line numberDiff line numberDiff line change
@@ -872,21 +872,17 @@ func (self *LocalCommitsController) revert(commit *models.Commit) error {
872872
if err := self.c.Helpers().MergeAndRebase.CheckMergeOrRebase(result); err != nil {
873873
return err
874874
}
875-
return self.afterRevertCommit()
875+
self.context().MoveSelection(1)
876+
return self.c.Refresh(types.RefreshOptions{
877+
Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS, types.BRANCHES},
878+
})
876879
})
877880
},
878881
})
879882

880883
return nil
881884
}
882885

883-
func (self *LocalCommitsController) afterRevertCommit() error {
884-
self.context().MoveSelection(1)
885-
return self.c.Refresh(types.RefreshOptions{
886-
Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS, types.BRANCHES},
887-
})
888-
}
889-
890886
func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) error {
891887
var disabledReasonWhenFilesAreNeeded *types.DisabledReason
892888
if len(self.c.Model().Files) == 0 {

0 commit comments

Comments
 (0)