Skip to content

Commit bfcc505

Browse files
committed
ux: use abbrev-hash of commit if the friendly name of it is longer than 32 chars
Signed-off-by: leo <longshuang@msn.cn>
1 parent 0e986b4 commit bfcc505

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Views/Histories.axaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
608608
if (!repo.IsBare)
609609
{
610610
var target = commit.GetFriendlyName();
611+
if (target.Length > 32)
612+
target = commit.SHA.Substring(0, 10);
611613

612614
if (isHead)
613615
{

0 commit comments

Comments
 (0)