mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 20:04:59 +00:00
code_style: run dotnet format
Some checks failed
Some checks failed
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
fbc8edcc13
commit
46231a759c
9 changed files with 9 additions and 10 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace SourceGit.ViewModels
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Theirs
|
public object Theirs
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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 &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue