mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
code_style: run dotnet format
This commit is contained in:
parent
2e87f83a38
commit
ec6fe25e87
10 changed files with 13 additions and 33 deletions
|
@ -6,7 +6,6 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public partial class Blame : Command
|
||||
{
|
||||
|
||||
[GeneratedRegex(@"^\^?([0-9a-f]+)\s+.*\((.*)\s+(\d+)\s+[\-\+]?\d+\s+\d+\) (.*)")]
|
||||
private static partial Regex REG_FORMAT();
|
||||
|
||||
|
|
|
@ -50,25 +50,17 @@ namespace SourceGit.Commands
|
|||
if (!allowEmpty && string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
if (string.IsNullOrEmpty(WorkingDirectory))
|
||||
{
|
||||
Args = $"config --global --unset {key}";
|
||||
}
|
||||
else
|
||||
{
|
||||
Args = $"config --unset {key}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(WorkingDirectory))
|
||||
{
|
||||
Args = $"config --global {key} \"{value}\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
Args = $"config {key} \"{value}\"";
|
||||
}
|
||||
}
|
||||
|
||||
return Exec();
|
||||
}
|
||||
|
|
|
@ -38,14 +38,10 @@ namespace SourceGit.Commands
|
|||
ProcessInlineHighlights();
|
||||
|
||||
if (_result.TextDiff.Lines.Count == 0)
|
||||
{
|
||||
_result.TextDiff = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
_result.TextDiff.MaxLineNumber = Math.Max(_newLine, _oldLine);
|
||||
}
|
||||
}
|
||||
|
||||
return _result;
|
||||
}
|
||||
|
|
|
@ -10,11 +10,5 @@
|
|||
Context = repo;
|
||||
Args = $"diff -a --ignore-cr-at-eol --check {opt}";
|
||||
}
|
||||
|
||||
public bool Result()
|
||||
{
|
||||
var rs = ReadToEnd();
|
||||
return rs.IsSuccess;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ namespace SourceGit.Commands
|
|||
var match = REG_FORMAT2().Match(line);
|
||||
if (match.Success)
|
||||
{
|
||||
var change = new Models.Change() {
|
||||
var change = new Models.Change()
|
||||
{
|
||||
Path = match.Groups[3].Value,
|
||||
DataForAmend = new Models.ChangeDataForAmend()
|
||||
{
|
||||
|
@ -46,7 +47,8 @@ namespace SourceGit.Commands
|
|||
match = REG_FORMAT1().Match(line);
|
||||
if (match.Success)
|
||||
{
|
||||
var change = new Models.Change() {
|
||||
var change = new Models.Change()
|
||||
{
|
||||
Path = match.Groups[4].Value,
|
||||
DataForAmend = new Models.ChangeDataForAmend()
|
||||
{
|
||||
|
|
|
@ -23,11 +23,8 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
var result = new Commands.IsConflictResolved(repo, change).Result();
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
IsResolved = result;
|
||||
});
|
||||
var result = new Commands.IsConflictResolved(repo, change).ReadToEnd().IsSuccess;
|
||||
Dispatcher.UIThread.Post(() => IsResolved = result);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue