refactor<*>: rewrite all codes...

This commit is contained in:
leo 2021-04-29 20:05:55 +08:00
parent 89ff8aa744
commit 30ab8ae954
342 changed files with 17208 additions and 19633 deletions

19
src/Commands/Commit.cs Normal file
View file

@ -0,0 +1,19 @@
using System.IO;
namespace SourceGit.Commands {
/// <summary>
/// `git commit`命令
/// </summary>
public class Commit : Command {
private string msg = null;
public Commit(string repo, string message, bool amend) {
msg = Path.GetTempFileName();
File.WriteAllText(msg, message);
Cwd = repo;
Args = $"commit --file=\"{msg}\"";
if (amend) Args += " --amend --no-edit";
}
}
}