Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git2go')
-rw-r--r--internal/git2go/cherry_pick.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/internal/git2go/cherry_pick.go b/internal/git2go/cherry_pick.go
new file mode 100644
index 000000000..71c7c6f06
--- /dev/null
+++ b/internal/git2go/cherry_pick.go
@@ -0,0 +1,33 @@
+package git2go
+
+import (
+ "context"
+ "time"
+
+ "gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
+)
+
+// CherryPickCommand contains parameters to perform a cherry pick.
+type CherryPickCommand struct {
+ // Repository is the path where to execute the cherry pick.
+ Repository string
+ // AuthorName is the author name for the resulting commit.
+ AuthorName string
+ // AuthorMail is the author mail for the resulting commit.
+ AuthorMail string
+ // AuthorDate is the author date of revert commit.
+ AuthorDate time.Time
+ // Message is the message to be used for the resulting commit.
+ Message string
+ // Ours is the commit that the revert is applied to.
+ Ours string
+ // Commit is the commit that is to be picked.
+ Commit string
+ // Mainline is the parent to be considered the mainline
+ Mainline uint
+}
+
+// Run performs a cherry pick via gitaly-git2go.
+func (m CherryPickCommand) Run(ctx context.Context, cfg config.Cfg) (string, error) {
+ return runWithGob(ctx, cfg, "cherry-pick", m)
+}