mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -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)
|
||||
pathsBuilder.Append($"\"{c.Path}\" ");
|
||||
|
||||
|
||||
var paths = pathsBuilder.ToString();
|
||||
Args = $"stash push --staged -m \"{message}\" -- {paths}";
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ namespace SourceGit.Commands
|
|||
new Add(WorkingDirectory, needAdd).Exec();
|
||||
needAdd.Clear();
|
||||
}
|
||||
|
||||
|
||||
var paths = pathsBuilder.ToString();
|
||||
Args = $"stash push -m \"{message}\" -- {paths}";
|
||||
}
|
||||
|
||||
|
||||
return Exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace SourceGit.Models
|
|||
get;
|
||||
set;
|
||||
} = string.Empty;
|
||||
|
||||
|
||||
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
||||
{
|
||||
get;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace SourceGit.Native
|
|||
startInfo.CreateNoWindow = true;
|
||||
startInfo.RedirectStandardOutput = true;
|
||||
startInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var proc = new Process() { StartInfo = startInfo };
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace SourceGit.ViewModels
|
|||
Targets[0].SHA,
|
||||
!AutoCommit,
|
||||
AppendSourceToMessage,
|
||||
$"-m {MainlineForMergeCommit+1}").Exec();
|
||||
$"-m {MainlineForMergeCommit + 1}").Exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ namespace SourceGit.ViewModels
|
|||
AppendSourceToMessage,
|
||||
string.Empty).Exec();
|
||||
}
|
||||
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return succ;
|
||||
});
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace SourceGit.ViewModels
|
|||
set;
|
||||
} = 0;
|
||||
}
|
||||
|
||||
|
||||
public class Discard : Popup
|
||||
{
|
||||
public object Mode
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
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;
|
||||
|
@ -445,7 +445,7 @@ namespace SourceGit.ViewModels
|
|||
PopupHost.ShowPopup(new CherryPick(_repo, commit, parents));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(cherryPick);
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace SourceGit.ViewModels
|
|||
return Models.MergeMode.Supported[2];
|
||||
if (config.Equals("--no-commit", StringComparison.Ordinal) || config.Equals("--no-ff --no-commit", StringComparison.Ordinal))
|
||||
return Models.MergeMode.Supported[3];
|
||||
|
||||
|
||||
return Models.MergeMode.Supported[0];
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace SourceGit.ViewModels
|
|||
_repo.Settings.Filters.Remove(oldName);
|
||||
_repo.Settings.Filters.Add($"refs/heads/{_name}");
|
||||
}
|
||||
|
||||
|
||||
_repo.MarkBranchesDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
});
|
||||
|
|
|
@ -862,7 +862,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (_settings.Filters.Count != 0)
|
||||
Dispatcher.UIThread.Invoke(() => _settings.Filters.Clear());
|
||||
|
||||
|
||||
limits += "--exclude=refs/stash --all";
|
||||
}
|
||||
|
||||
|
|
|
@ -1202,7 +1202,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (_useAmend)
|
||||
return new Commands.QueryStagedChangesWithAmend(_repo.FullPath).Result();
|
||||
|
||||
|
||||
var rs = new List<Models.Change>();
|
||||
foreach (var c in _cached)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace SourceGit.Views
|
|||
];
|
||||
|
||||
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 =
|
||||
AvaloniaProperty.Register<ChangeStatusIcon, bool>(nameof(IsUnstagedChange));
|
||||
|
@ -142,7 +142,7 @@ namespace SourceGit.Views
|
|||
ToolTip.SetTip(this, c.IsConflit ? "Conflict" : TIPS[(int)c.WorkTree]);
|
||||
else
|
||||
ToolTip.SetTip(this, TIPS[(int)c.Index]);
|
||||
|
||||
|
||||
InvalidateVisual();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,6 @@ namespace SourceGit.Views
|
|||
context.DrawRectangle(item.Brush, null, entireRect);
|
||||
|
||||
context.DrawText(item.Label, new Point(x + 16, 8.0 - item.Label.Height * 0.5));
|
||||
context.DrawRectangle(null, new Pen(item.Brush), entireRect);
|
||||
}
|
||||
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.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)))
|
||||
context.DrawGeometry(fg, null, item.Icon);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace SourceGit.Views
|
|||
var item = vm.SelectedItem;
|
||||
if (item == null)
|
||||
{
|
||||
base.OnKeyDown(e);
|
||||
base.OnKeyDown(e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue