mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
code_style: simplify static commands used by styles and main menu; run dotnet format
This commit is contained in:
parent
e27d2d6a3f
commit
998230edff
10 changed files with 35 additions and 52 deletions
|
@ -262,7 +262,7 @@ namespace SourceGit.ViewModels
|
|||
Task.Run(() => Commands.MergeTool.OpenForDiff(_repo.FullPath, toolType, toolPath, opt));
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
||||
var fullPath = Path.Combine(_repo.FullPath, change.Path);
|
||||
var explore = new MenuItem();
|
||||
explore.Header = App.Text("RevealFile");
|
||||
|
@ -320,11 +320,11 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (change.Index == Models.ChangeState.Renamed)
|
||||
new Commands.Checkout(_repo.FullPath).FileWithRevision(change.OriginalPath, $"{_commit.SHA}~1");
|
||||
|
||||
|
||||
new Commands.Checkout(_repo.FullPath).FileWithRevision(change.Path, $"{_commit.SHA}~1");
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
||||
menu.Items.Add(resetToThisRevision);
|
||||
menu.Items.Add(resetToFirstParent);
|
||||
menu.Items.Add(new MenuItem { Header = "-" });
|
||||
|
@ -413,7 +413,7 @@ namespace SourceGit.ViewModels
|
|||
window.Show();
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
||||
var resetToThisRevision = new MenuItem();
|
||||
resetToThisRevision.Header = App.Text("ChangeCM.CheckoutThisRevision");
|
||||
resetToThisRevision.Icon = App.CreateMenuIcon("Icons.File.Checkout");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue