mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
enhance: manually stage all changes instead of using --all
parameter in git commit
This commit is contained in:
parent
3bcea2a4f0
commit
2ffc1b7178
10 changed files with 16 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue