From df1e5512da90cc003767248d2df20e88a9691959 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 15 Jan 2026 20:20:55 +0100 Subject: [PATCH] Make getHashesAndSubjects a free-standing function There's no reason for this to be a method. --- pkg/gui/controllers/helpers/fixup_helper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/gui/controllers/helpers/fixup_helper.go b/pkg/gui/controllers/helpers/fixup_helper.go index 201749761..054a5bbf1 100644 --- a/pkg/gui/controllers/helpers/fixup_helper.go +++ b/pkg/gui/controllers/helpers/fixup_helper.go @@ -114,7 +114,7 @@ func (self *FixupHelper) HandleFindBaseCommitForFixupPress() error { // If there are multiple commits that could be the base commit, list // them in the error message. But only the candidates from the current // branch, not including any that are already merged. - subjects := self.getHashesAndSubjects(commits, hashGroups[NOT_MERGED]) + subjects := getHashesAndSubjects(commits, hashGroups[NOT_MERGED]) message := lo.Ternary(hasStagedChanges, self.c.Tr.MultipleBaseCommitsFoundStaged, self.c.Tr.MultipleBaseCommitsFoundUnstaged) @@ -144,7 +144,7 @@ func (self *FixupHelper) HandleFindBaseCommitForFixupPress() error { }) } -func (self *FixupHelper) getHashesAndSubjects(commits []*models.Commit, hashes []string) string { +func getHashesAndSubjects(commits []*models.Commit, hashes []string) string { // This is called only for the NOT_MERGED commits, and we know that all of them are contained in // the commits slice. commitsSet := set.NewFromSlice(hashes)