doDeleteCommitAndPush implemented

This commit is contained in:
truecode112
2023-05-18 11:47:12 +03:00
parent 4936e49096
commit e9c29f82f2
2 changed files with 45 additions and 7 deletions
+8
View File
@@ -100,6 +100,14 @@ func AddChangesWithArgs(repoPath string, globalArgs TrustedCmdArgs, all bool, fi
return err
}
// DeleteChangesWithArgs marks local changes to be ready for commit.
func DeleteChangesWithArgs(repoPath string, globalArgs TrustedCmdArgs, files ...string) error {
cmd := NewCommandContextNoGlobals(DefaultContext, globalArgs...).AddArguments("rm")
cmd.AddDashesAndList(files...)
_, _, err := cmd.RunStdString(&RunOpts{Dir: repoPath})
return err
}
// CommitChangesOptions the options when a commit created
type CommitChangesOptions struct {
Committer *Signature