enhance: manually stage all changes instead of using --all parameter in git commit

This commit is contained in:
leo 2024-08-15 20:09:38 +08:00
parent 3bcea2a4f0
commit 2ffc1b7178
No known key found for this signature in database
10 changed files with 16 additions and 21 deletions

View file

@ -4,7 +4,7 @@ namespace SourceGit.Commands
{
public class Commit : Command
{
public Commit(string repo, string message, bool autoStage, bool amend, bool allowEmpty = false)
public Commit(string repo, string message, bool amend, bool allowEmpty = false)
{
var file = Path.GetTempFileName();
File.WriteAllText(file, message);
@ -13,8 +13,6 @@ namespace SourceGit.Commands
Context = repo;
TraitErrorAsOutput = true;
Args = $"commit --file=\"{file}\"";
if (autoStage)
Args += " --all";
if (amend)
Args += " --amend --no-edit";
if (allowEmpty)