File tree 3 files changed +4
-3
lines changed 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,7 @@ func main() {
308
308
dh .RegisterDefinition ("Sync go-private master branch with public" , privateSyncTask .NewDefinition ())
309
309
310
310
privateXPatchTask := & task.PrivXPatch {
311
+ Git : gitClient ,
311
312
PublicGerrit : gerritClient ,
312
313
PrivateGerrit : privateGerritClient ,
313
314
PublicRepoURL : func (repo string ) string {
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
19
19
)
20
20
21
21
type PrivXPatch struct {
22
+ Git * Git
22
23
PublicGerrit GerritClient
23
24
PrivateGerrit GerritClient
24
25
// PublicRepoURL returns a git clone URL for repo
@@ -75,9 +76,7 @@ func (x *PrivXPatch) NewDefinition(tagx *TagXReposTasks) *wf.Definition {
75
76
// to replicate from one instance to another using the API alone. Rather
76
77
// than adding workarounds for those edge cases, we just use Git
77
78
// directly, which makes the process extremely simple.
78
- git := & Git {}
79
-
80
- repo , err := git .Clone (ctx , x .PublicRepoURL (repoName ))
79
+ repo , err := x .Git .Clone (ctx , x .PublicRepoURL (repoName ))
81
80
if err != nil {
82
81
return nil , err
83
82
}
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ echo`), 0777); err != nil {
90
90
var announcementHeader MailHeader
91
91
var announcementMessage MailContent
92
92
p := & PrivXPatch {
93
+ Git : & Git {},
93
94
PrivateGerrit : & privxClient {privRepoDir : privRepo .dir .dir },
94
95
PublicGerrit : & privxClient {},
95
96
You can’t perform that action at this time.
0 commit comments