code_style: run dotnet format

This commit is contained in:
leo 2024-06-06 15:31:02 +08:00
parent ed62174942
commit 4610f702b3
No known key found for this signature in database
GPG key ID: B528468E49CD0E58
29 changed files with 48 additions and 76 deletions

View file

@ -52,12 +52,12 @@ namespace SourceGit.Commands
var refName = parts[0];
if (refName.EndsWith("/HEAD", StringComparison.Ordinal))
return;
if (refName.StartsWith(PREFIX_DETACHED, StringComparison.Ordinal))
{
branch.IsHead = true;
}
if (refName.StartsWith(PREFIX_LOCAL, StringComparison.Ordinal))
{
branch.Name = refName.Substring(PREFIX_LOCAL.Length);

View file

@ -57,7 +57,8 @@ namespace SourceGit.Commands
if (line.Equals(_endOfBodyToken, StringComparison.Ordinal))
{
_nextPartIdx = 0;
if (!string.IsNullOrEmpty(_current.Message)) _current.Message = _current.Message.Trim();
if (!string.IsNullOrEmpty(_current.Message))
_current.Message = _current.Message.Trim();
}
else
{

View file

@ -6,7 +6,8 @@ namespace SourceGit.Commands
{
public class QuerySingleCommit : Command
{
public QuerySingleCommit(string repo, string sha) {
public QuerySingleCommit(string repo, string sha)
{
WorkingDirectory = repo;
Context = repo;
Args = $"show --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%B -s {sha}";
@ -19,7 +20,7 @@ namespace SourceGit.Commands
{
var commit = new Models.Commit();
var lines = rs.StdOut.Split('\n');
if (lines.Length < 8)
if (lines.Length < 8)
return null;
commit.SHA = lines[0];