Skip to content

Commit 19544b2

Browse files
committed
Inline afterRevertCommit
It's only called from one place now, so there's no reason not to inline it.
1 parent 83eeb72 commit 19544b2

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
@@ -871,21 +871,17 @@ func (self *LocalCommitsController) revert(commit *models.Commit) error {
871871
if err := self.c.Helpers().MergeAndRebase.CheckMergeOrRebase(result); err != nil {
872872
return err
873873
}
874-
return self.afterRevertCommit()
874+
self.context().MoveSelection(1)
875+
return self.c.Refresh(types.RefreshOptions{
876+
Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS, types.BRANCHES},
877+
})
875878
})
876879
},
877880
})
878881

879882
return nil
880883
}
881884

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

0 commit comments

Comments
 (0)