style: add .editorconfig for code formatting. see issu #25

This commit is contained in:
leo 2024-03-18 09:37:06 +08:00
parent a8eeea4f78
commit 18aaa0a143
225 changed files with 7781 additions and 3911 deletions

View file

@ -1,18 +1,25 @@
using System.Collections.Generic;
using System.Text;
namespace SourceGit.Commands {
public class Add : Command {
public Add(string repo, List<Models.Change> changes = null) {
namespace SourceGit.Commands
{
public class Add : Command
{
public Add(string repo, List<Models.Change> changes = null)
{
WorkingDirectory = repo;
Context = repo;
if (changes == null || changes.Count == 0) {
if (changes == null || changes.Count == 0)
{
Args = "add .";
} else {
}
else
{
var builder = new StringBuilder();
builder.Append("add --");
foreach (var c in changes) {
foreach (var c in changes)
{
builder.Append(" \"");
builder.Append(c.Path);
builder.Append("\"");
@ -21,4 +28,4 @@ namespace SourceGit.Commands {
}
}
}
}
}