code_style: run dotnet format
Some checks failed
Continuous Integration / Build (push) Has been cancelled
Continuous Integration / Prepare version string (push) Has been cancelled
Localization Check / localization-check (push) Has been cancelled
Continuous Integration / Package (push) Has been cancelled

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-28 15:17:05 +08:00
parent fbc8edcc13
commit 46231a759c
No known key found for this signature in database
9 changed files with 9 additions and 10 deletions

View file

@ -58,7 +58,7 @@ namespace SourceGit.Commands
if (b.TrackStatus == null) if (b.TrackStatus == null)
b.TrackStatus = new Models.BranchTrackStatus(); b.TrackStatus = new Models.BranchTrackStatus();
} }
} }
} }

View file

@ -24,7 +24,7 @@ namespace SourceGit.Commands
var rs = ReadToEnd(); var rs = ReadToEnd();
if (!rs.IsSuccess) if (!rs.IsSuccess)
return []; return [];
var changes = new List<Models.Change>(); var changes = new List<Models.Change>();
var lines = rs.StdOut.Split(['\r', '\n'], StringSplitOptions.RemoveEmptyEntries); var lines = rs.StdOut.Split(['\r', '\n'], StringSplitOptions.RemoveEmptyEntries);
foreach (var line in lines) foreach (var line in lines)

View file

@ -49,7 +49,6 @@ namespace SourceGit.Models
public string OriginalPath { get; set; } = ""; public string OriginalPath { get; set; } = "";
public ChangeDataForAmend DataForAmend { get; set; } = null; public ChangeDataForAmend DataForAmend { get; set; } = null;
public ConflictReason ConflictReason { get; set; } = ConflictReason.None; public ConflictReason ConflictReason { get; set; } = ConflictReason.None;
public bool IsSubmodule { get; set; } = false;
public bool IsConflicted => WorkTree == ChangeState.Conflicted; public bool IsConflicted => WorkTree == ChangeState.Conflicted;
public void Set(ChangeState index, ChangeState workTree = ChangeState.None) public void Set(ChangeState index, ChangeState workTree = ChangeState.None)
@ -78,7 +77,7 @@ namespace SourceGit.Models
if (Path[0] == '"') if (Path[0] == '"')
Path = Path.Substring(1, Path.Length - 2); Path = Path.Substring(1, Path.Length - 2);
if (!string.IsNullOrEmpty(OriginalPath) && OriginalPath[0] == '"') if (!string.IsNullOrEmpty(OriginalPath) && OriginalPath[0] == '"')
OriginalPath = OriginalPath.Substring(1, OriginalPath.Length - 2); OriginalPath = OriginalPath.Substring(1, OriginalPath.Length - 2);
} }

View file

@ -36,7 +36,7 @@ namespace SourceGit.ViewModels
get; get;
private set; private set;
} }
public object Theirs public object Theirs
{ {
get; get;

View file

@ -178,7 +178,7 @@ namespace SourceGit.ViewModels
if (action == Models.InteractiveRebaseAction.Squash || action == Models.InteractiveRebaseAction.Fixup) if (action == Models.InteractiveRebaseAction.Squash || action == Models.InteractiveRebaseAction.Fixup)
return; return;
} }
item.Action = action; item.Action = action;
UpdateItems(); UpdateItems();
} }

View file

@ -639,7 +639,7 @@ namespace SourceGit.ViewModels
Task.Run(RefreshWorktrees); Task.Run(RefreshWorktrees);
Task.Run(RefreshWorkingCopyChanges); Task.Run(RefreshWorkingCopyChanges);
Task.Run(RefreshStashes); Task.Run(RefreshStashes);
Task.Run(() => Task.Run(() =>
{ {
var config = new Commands.Config(_fullpath).ListAll(); var config = new Commands.Config(_fullpath).ListAll();

View file

@ -61,7 +61,7 @@ namespace SourceGit.ViewModels
{ {
var changes = new Commands.CompareRevisions(_repo.FullPath, $"{value.SHA}^", value.SHA).Result(); var changes = new Commands.CompareRevisions(_repo.FullPath, $"{value.SHA}^", value.SHA).Result();
var untracked = new List<Models.Change>(); var untracked = new List<Models.Change>();
if (value.Parents.Count == 3) if (value.Parents.Count == 3)
{ {
untracked = new Commands.CompareRevisions(_repo.FullPath, Models.Commit.EmptyTreeSHA1, value.Parents[2]).Result(); untracked = new Commands.CompareRevisions(_repo.FullPath, Models.Commit.EmptyTreeSHA1, value.Parents[2]).Result();

View file

@ -1770,7 +1770,7 @@ namespace SourceGit.ViewModels
{ {
if (old.Count != cur.Count) if (old.Count != cur.Count)
return true; return true;
var oldMap = new Dictionary<string, Models.Change>(); var oldMap = new Dictionary<string, Models.Change>();
foreach (var c in old) foreach (var c in old)
oldMap.Add(c.Path, c); oldMap.Add(c.Path, c);

View file

@ -153,7 +153,7 @@ namespace SourceGit.Views
e.Handled = true; e.Handled = true;
} }
} }
private void OnChangeRebaseAction(object sender, RoutedEventArgs e) private void OnChangeRebaseAction(object sender, RoutedEventArgs e)
{ {
if (DataContext is ViewModels.InteractiveRebase vm && if (DataContext is ViewModels.InteractiveRebase vm &&