mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
code_style: run dotnet format
This commit is contained in:
parent
4c60818d68
commit
ccdc849baa
13 changed files with 19 additions and 19 deletions
|
@ -25,7 +25,7 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
foreach (var c in changes)
|
foreach (var c in changes)
|
||||||
pathsBuilder.Append($"\"{c.Path}\" ");
|
pathsBuilder.Append($"\"{c.Path}\" ");
|
||||||
|
|
||||||
var paths = pathsBuilder.ToString();
|
var paths = pathsBuilder.ToString();
|
||||||
Args = $"stash push --staged -m \"{message}\" -- {paths}";
|
Args = $"stash push --staged -m \"{message}\" -- {paths}";
|
||||||
}
|
}
|
||||||
|
@ -51,11 +51,11 @@ namespace SourceGit.Commands
|
||||||
new Add(WorkingDirectory, needAdd).Exec();
|
new Add(WorkingDirectory, needAdd).Exec();
|
||||||
needAdd.Clear();
|
needAdd.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
var paths = pathsBuilder.ToString();
|
var paths = pathsBuilder.ToString();
|
||||||
Args = $"stash push -m \"{message}\" -- {paths}";
|
Args = $"stash push -m \"{message}\" -- {paths}";
|
||||||
}
|
}
|
||||||
|
|
||||||
return Exec();
|
return Exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace SourceGit.Models
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
} = string.Empty;
|
} = string.Empty;
|
||||||
|
|
||||||
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace SourceGit.Native
|
||||||
startInfo.CreateNoWindow = true;
|
startInfo.CreateNoWindow = true;
|
||||||
startInfo.RedirectStandardOutput = true;
|
startInfo.RedirectStandardOutput = true;
|
||||||
startInfo.StandardOutputEncoding = Encoding.UTF8;
|
startInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var proc = new Process() { StartInfo = startInfo };
|
var proc = new Process() { StartInfo = startInfo };
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace SourceGit.ViewModels
|
||||||
Targets[0].SHA,
|
Targets[0].SHA,
|
||||||
!AutoCommit,
|
!AutoCommit,
|
||||||
AppendSourceToMessage,
|
AppendSourceToMessage,
|
||||||
$"-m {MainlineForMergeCommit+1}").Exec();
|
$"-m {MainlineForMergeCommit + 1}").Exec();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ namespace SourceGit.ViewModels
|
||||||
AppendSourceToMessage,
|
AppendSourceToMessage,
|
||||||
string.Empty).Exec();
|
string.Empty).Exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
return succ;
|
return succ;
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace SourceGit.ViewModels
|
||||||
set;
|
set;
|
||||||
} = 0;
|
} = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Discard : Popup
|
public class Discard : Popup
|
||||||
{
|
{
|
||||||
public object Mode
|
public object Mode
|
||||||
|
|
|
@ -156,7 +156,7 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
if (_repo.SearchResultSelectedCommit == null || _repo.SearchResultSelectedCommit.SHA != commit.SHA)
|
if (_repo.SearchResultSelectedCommit == null || _repo.SearchResultSelectedCommit.SHA != commit.SHA)
|
||||||
{
|
{
|
||||||
_repo.SearchResultSelectedCommit = _repo.SearchedCommits.Find(x => x.SHA == commit.SHA);
|
_repo.SearchResultSelectedCommit = _repo.SearchedCommits.Find(x => x.SHA == commit.SHA);
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoSelectedCommit = commit;
|
AutoSelectedCommit = commit;
|
||||||
|
@ -445,7 +445,7 @@ namespace SourceGit.ViewModels
|
||||||
PopupHost.ShowPopup(new CherryPick(_repo, commit, parents));
|
PopupHost.ShowPopup(new CherryPick(_repo, commit, parents));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
};
|
};
|
||||||
menu.Items.Add(cherryPick);
|
menu.Items.Add(cherryPick);
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace SourceGit.ViewModels
|
||||||
return Models.MergeMode.Supported[2];
|
return Models.MergeMode.Supported[2];
|
||||||
if (config.Equals("--no-commit", StringComparison.Ordinal) || config.Equals("--no-ff --no-commit", StringComparison.Ordinal))
|
if (config.Equals("--no-commit", StringComparison.Ordinal) || config.Equals("--no-ff --no-commit", StringComparison.Ordinal))
|
||||||
return Models.MergeMode.Supported[3];
|
return Models.MergeMode.Supported[3];
|
||||||
|
|
||||||
return Models.MergeMode.Supported[0];
|
return Models.MergeMode.Supported[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace SourceGit.ViewModels
|
||||||
_repo.Settings.Filters.Remove(oldName);
|
_repo.Settings.Filters.Remove(oldName);
|
||||||
_repo.Settings.Filters.Add($"refs/heads/{_name}");
|
_repo.Settings.Filters.Add($"refs/heads/{_name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
_repo.MarkBranchesDirtyManually();
|
_repo.MarkBranchesDirtyManually();
|
||||||
_repo.SetWatcherEnabled(true);
|
_repo.SetWatcherEnabled(true);
|
||||||
});
|
});
|
||||||
|
|
|
@ -862,7 +862,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
if (_settings.Filters.Count != 0)
|
if (_settings.Filters.Count != 0)
|
||||||
Dispatcher.UIThread.Invoke(() => _settings.Filters.Clear());
|
Dispatcher.UIThread.Invoke(() => _settings.Filters.Clear());
|
||||||
|
|
||||||
limits += "--exclude=refs/stash --all";
|
limits += "--exclude=refs/stash --all";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1202,7 +1202,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
if (_useAmend)
|
if (_useAmend)
|
||||||
return new Commands.QueryStagedChangesWithAmend(_repo.FullPath).Result();
|
return new Commands.QueryStagedChangesWithAmend(_repo.FullPath).Result();
|
||||||
|
|
||||||
var rs = new List<Models.Change>();
|
var rs = new List<Models.Change>();
|
||||||
foreach (var c in _cached)
|
foreach (var c in _cached)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace SourceGit.Views
|
||||||
];
|
];
|
||||||
|
|
||||||
private static readonly string[] INDICATOR = ["?", "±", "T", "+", "−", "➜", "❏", "U", "★"];
|
private static readonly string[] INDICATOR = ["?", "±", "T", "+", "−", "➜", "❏", "U", "★"];
|
||||||
private static readonly string[] TIPS = ["Unknown", "Modified", "Type Changed", "Added", "Deleted", "Renamed", "Copied", "Unmerged", "Untracked" ];
|
private static readonly string[] TIPS = ["Unknown", "Modified", "Type Changed", "Added", "Deleted", "Renamed", "Copied", "Unmerged", "Untracked"];
|
||||||
|
|
||||||
public static readonly StyledProperty<bool> IsUnstagedChangeProperty =
|
public static readonly StyledProperty<bool> IsUnstagedChangeProperty =
|
||||||
AvaloniaProperty.Register<ChangeStatusIcon, bool>(nameof(IsUnstagedChange));
|
AvaloniaProperty.Register<ChangeStatusIcon, bool>(nameof(IsUnstagedChange));
|
||||||
|
@ -142,7 +142,7 @@ namespace SourceGit.Views
|
||||||
ToolTip.SetTip(this, c.IsConflit ? "Conflict" : TIPS[(int)c.WorkTree]);
|
ToolTip.SetTip(this, c.IsConflit ? "Conflict" : TIPS[(int)c.WorkTree]);
|
||||||
else
|
else
|
||||||
ToolTip.SetTip(this, TIPS[(int)c.Index]);
|
ToolTip.SetTip(this, TIPS[(int)c.Index]);
|
||||||
|
|
||||||
InvalidateVisual();
|
InvalidateVisual();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,6 @@ namespace SourceGit.Views
|
||||||
context.DrawRectangle(item.Brush, null, entireRect);
|
context.DrawRectangle(item.Brush, null, entireRect);
|
||||||
|
|
||||||
context.DrawText(item.Label, new Point(x + 16, 8.0 - item.Label.Height * 0.5));
|
context.DrawText(item.Label, new Point(x + 16, 8.0 - item.Label.Height * 0.5));
|
||||||
context.DrawRectangle(null, new Pen(item.Brush), entireRect);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -93,9 +92,10 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
context.DrawLine(new Pen(item.Brush), new Point(x + 16, 0), new Point(x + 16, 16));
|
context.DrawLine(new Pen(item.Brush), new Point(x + 16, 0), new Point(x + 16, 16));
|
||||||
context.DrawText(item.Label, new Point(x + 20, 8.0 - item.Label.Height * 0.5));
|
context.DrawText(item.Label, new Point(x + 20, 8.0 - item.Label.Height * 0.5));
|
||||||
context.DrawRectangle(null, new Pen(item.Brush), entireRect);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.DrawRectangle(null, new Pen(item.Brush), entireRect);
|
||||||
|
|
||||||
using (context.PushTransform(Matrix.CreateTranslation(x + 3, 3)))
|
using (context.PushTransform(Matrix.CreateTranslation(x + 3, 3)))
|
||||||
context.DrawGeometry(fg, null, item.Icon);
|
context.DrawGeometry(fg, null, item.Icon);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace SourceGit.Views
|
||||||
var item = vm.SelectedItem;
|
var item = vm.SelectedItem;
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
base.OnKeyDown(e);
|
base.OnKeyDown(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue