doDeleteCommitAndPush implemented

This commit is contained in:
truecode112 committed 2023-05-18 11:47:12 +03:00
1 parent 4936e49096
commit e9c29f82f2
2 files changed
+45 -7

No files matched your search

+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