mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24: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");
|
||||
|
|
|
@ -27,10 +27,11 @@ namespace SourceGit.ViewModels
|
|||
public MoveRepositoryNode(RepositoryNode target)
|
||||
{
|
||||
Target = target;
|
||||
Rows.Add(new RepositoryNode() {
|
||||
Name = "ROOT",
|
||||
Depth = 0,
|
||||
Id = Guid.NewGuid().ToString()
|
||||
Rows.Add(new RepositoryNode()
|
||||
{
|
||||
Name = "ROOT",
|
||||
Depth = 0,
|
||||
Id = Guid.NewGuid().ToString()
|
||||
});
|
||||
MakeRows(Preference.Instance.RepositoryNodes, 1);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace SourceGit.ViewModels
|
|||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
var normalizedRoot = rootDir.FullName.Replace("\\", "/");
|
||||
|
||||
|
||||
foreach (var f in founded)
|
||||
{
|
||||
var parent = new DirectoryInfo(f).Parent!.FullName.Replace("\\", "/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue