diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 9efcc0e1..85ac9f1b 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -97,6 +97,7 @@ Compare with HEAD Compare with Worktree Copy SHA + Copy Info Interactive Rebase ${0}$ to Here Rebase ${0}$ to Here Reset ${0}$ to Here diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index 15549038..71f3b6f0 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -435,6 +435,17 @@ namespace SourceGit.ViewModels e.Handled = true; }; menu.Items.Add(copySHA); + + var copyInfo = new MenuItem(); + copyInfo.Header = App.Text("CommitCM.CopyInfo"); + copyInfo.Icon = App.CreateMenuIcon("Icons.Copy"); + copyInfo.Click += (_, e) => + { + App.CopyText($"{commit.SHA[..7]} - {commit.Subject}"); + e.Handled = true; + }; + menu.Items.Add(copyInfo); + return menu; }