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,21 +1,26 @@
using System.Collections.Generic;
using System.Text;
namespace SourceGit.Commands {
public class Reset : Command {
public Reset(string repo) {
namespace SourceGit.Commands
{
public class Reset : Command
{
public Reset(string repo)
{
WorkingDirectory = repo;
Context = repo;
Args = "reset";
}
public Reset(string repo, List<Models.Change> changes) {
public Reset(string repo, List<Models.Change> changes)
{
WorkingDirectory = repo;
Context = repo;
var builder = new StringBuilder();
builder.Append("reset --");
foreach (var c in changes) {
foreach (var c in changes)
{
builder.Append(" \"");
builder.Append(c.Path);
builder.Append("\"");
@ -23,10 +28,11 @@ namespace SourceGit.Commands {
Args = builder.ToString();
}
public Reset(string repo, string revision, string mode) {
public Reset(string repo, string revision, string mode)
{
WorkingDirectory = repo;
Context = repo;
Args = $"reset {mode} {revision}";
}
}
}
}
}