mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
Add copy info that copies "{Short SHA} - {commit subject}" into clipboard
This commit is contained in:
parent
b160f4e47a
commit
300c1c99bf
2 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue