Skip to content

Commit b118a55

Browse files
committed
fixup! Allow to switch branches in Commit View
Use helper function for shortening the hash
1 parent d167486 commit b118a55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/gui/controllers/helpers/refs_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func (self *RefsHelper) CreateCheckoutMenu(commit *models.Commit) error {
305305
}
306306

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

0 commit comments

Comments
 (0)