mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-08 05:35:17 +02:00
doDeleteCommitAndPush implemented
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user