1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Make Commit.Hash a getter for an unexported hash field

This is in preparation for turning the hash into pointer to a string.
This commit is contained in:
Stefan Haller
2025-04-24 09:13:40 +02:00
parent 97aa7a04e6
commit 1037371a44
28 changed files with 301 additions and 245 deletions

View File

@ -268,10 +268,10 @@ func (self *RefsHelper) CreateGitResetMenu(ref string) error {
func (self *RefsHelper) CreateCheckoutMenu(commit *models.Commit) error {
branches := lo.Filter(self.c.Model().Branches, func(branch *models.Branch, _ int) bool {
return commit.Hash == branch.CommitHash && branch.Name != self.c.Model().CheckedOutBranch
return commit.Hash() == branch.CommitHash && branch.Name != self.c.Model().CheckedOutBranch
})
hash := commit.Hash
hash := commit.Hash()
menuItems := []*types.MenuItem{
{