blob: 7dd1d742092b04aa015973127e6f2bc6dac1c2e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package git2go
import (
"context"
"time"
"gitlab.com/gitlab-org/gitaly/internal/git"
"gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
)
type RevertCommand struct {
// Repository is the path to execute the revert in.
Repository string `json:"repository"`
// AuthorName is the author name of revert commit.
AuthorName string `json:"author_name"`
// AuthorMail is the author mail of revert commit.
AuthorMail string `json:"author_mail"`
// AuthorDate is the author date of revert commit.
AuthorDate time.Time `json:"author_date"`
// Message is the message to be used for the revert commit.
Message string `json:"message"`
// Ours is the commit that the revert is applied to.
Ours string `json:"ours"`
// Revert is the commit to be reverted.
Revert string `json:"revert"`
// Mainline is the parent to be considered the mainline
Mainline uint `json:"mainline"`
}
func (r RevertCommand) Run(ctx context.Context, cfg config.Cfg) (git.ObjectID, error) {
return runWithGob(ctx, cfg, "revert", r)
}
|