code_style: run dotnet format

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-10-23 15:28:09 +08:00
parent d4302b4faa
commit a5594130ed
No known key found for this signature in database
7 changed files with 8 additions and 9 deletions

View file

@ -11,7 +11,7 @@ namespace SourceGit.Commands
Context = repo; Context = repo;
Args = includeUntracked ? "add ." : "add -u ."; Args = includeUntracked ? "add ." : "add -u .";
} }
public Add(string repo, List<Models.Change> changes) public Add(string repo, List<Models.Change> changes)
{ {
WorkingDirectory = repo; WorkingDirectory = repo;

View file

@ -22,7 +22,7 @@ namespace SourceGit.Commands
public bool Run() public bool Run()
{ {
var succ = Exec(); var succ = Exec();
try try
{ {
File.Delete(_tmpFile); File.Delete(_tmpFile);

View file

@ -577,7 +577,7 @@ namespace SourceGit.ViewModels
private bool RemoveInvalidRepositoriesRecursive(List<RepositoryNode> collection) private bool RemoveInvalidRepositoriesRecursive(List<RepositoryNode> collection)
{ {
bool changed = false; bool changed = false;
for (int i = collection.Count - 1; i >= 0; i--) for (int i = collection.Count - 1; i >= 0; i--)
{ {
var node = collection[i]; var node = collection[i];

View file

@ -130,7 +130,7 @@ namespace SourceGit.Views
if (chars.Count >= 2 && char.IsAsciiLetterOrDigit(chars[0]) && char.IsAsciiLetterOrDigit(chars[^1])) if (chars.Count >= 2 && char.IsAsciiLetterOrDigit(chars[0]) && char.IsAsciiLetterOrDigit(chars[^1]))
return string.Format("{0}{1}", chars[0], chars[^1]); return string.Format("{0}{1}", chars[0], chars[^1]);
return name.Substring(0, 1); return name.Substring(0, 1);
} }

View file

@ -19,7 +19,7 @@ namespace SourceGit.Views
e.Handled = true; e.Handled = true;
} }
private void OnChangeContextRequested(object sender, ContextRequestedEventArgs e) private void OnChangeContextRequested(object sender, ContextRequestedEventArgs e)
{ {
if (DataContext is ViewModels.StashesPage vm && sender is Grid grid) if (DataContext is ViewModels.StashesPage vm && sender is Grid grid)
{ {

View file

@ -6,7 +6,6 @@ using System.Text;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Data; using Avalonia.Data;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;

View file

@ -124,9 +124,9 @@ namespace SourceGit.Views
{ {
if (DataContext is ViewModels.WorkingCopy vm) if (DataContext is ViewModels.WorkingCopy vm)
{ {
var dialog = new ConventionalCommitMessageBuilder() var dialog = new ConventionalCommitMessageBuilder()
{ {
DataContext = new ViewModels.ConventionalCommitMessageBuilder(vm) DataContext = new ViewModels.ConventionalCommitMessageBuilder(vm)
}; };
App.OpenDialog(dialog); App.OpenDialog(dialog);