Skip to content

Commit

Permalink
fixup! Allow to switch branches in Commit View
Browse files Browse the repository at this point in the history
Use helper function for shortening the hash
  • Loading branch information
stefanhaller committed Jan 1, 2025
1 parent d167486 commit b118a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/gui/controllers/helpers/refs_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (self *RefsHelper) CreateCheckoutMenu(commit *models.Commit) error {
}

menuItems = append(menuItems, &types.MenuItem{
LabelColumns: []string{fmt.Sprintf(self.c.Tr.Actions.CheckoutCommitAsDetachedHead, hash[:8])},
LabelColumns: []string{fmt.Sprintf(self.c.Tr.Actions.CheckoutCommitAsDetachedHead, utils.ShortHash(hash))},
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.CheckoutCommit)
return self.CheckoutRef(hash, types.CheckoutRefOptions{})
Expand Down

0 comments on commit b118a55

Please sign in to comment.