@@ -130,20 +130,20 @@ func (repo *Repository) CreateBranch(ctx context.Context, branch, oldbranchOrCom
130
130
}
131
131
132
132
// AddRemote adds a new remote to repository.
133
- func (repo * Repository ) AddRemote (name , url string , fetch bool ) error {
133
+ func (repo * Repository ) AddRemote (ctx context. Context , name , url string , fetch bool ) error {
134
134
cmd := NewCommand ("remote" , "add" )
135
135
if fetch {
136
136
cmd .AddArguments ("-f" )
137
137
}
138
138
cmd .AddDynamicArguments (name , url )
139
139
140
- _ , _ , err := cmd .RunStdString (repo . Ctx , & RunOpts {Dir : repo .Path })
140
+ _ , _ , err := cmd .RunStdString (ctx , & RunOpts {Dir : repo .Path })
141
141
return err
142
142
}
143
143
144
144
// RemoveRemote removes a remote from repository.
145
- func (repo * Repository ) RemoveRemote (name string ) error {
146
- _ , _ , err := NewCommand ("remote" , "rm" ).AddDynamicArguments (name ).RunStdString (repo . Ctx , & RunOpts {Dir : repo .Path })
145
+ func (repo * Repository ) RemoveRemote (ctx context. Context , name string ) error {
146
+ _ , _ , err := NewCommand ("remote" , "rm" ).AddDynamicArguments (name ).RunStdString (ctx , & RunOpts {Dir : repo .Path })
147
147
return err
148
148
}
149
149
@@ -153,7 +153,7 @@ func (branch *Branch) GetCommit() (*Commit, error) {
153
153
}
154
154
155
155
// RenameBranch rename a branch
156
- func (repo * Repository ) RenameBranch (from , to string ) error {
157
- _ , _ , err := NewCommand ("branch" , "-m" ).AddDynamicArguments (from , to ).RunStdString (repo . Ctx , & RunOpts {Dir : repo .Path })
156
+ func (repo * Repository ) RenameBranch (ctx context. Context , from , to string ) error {
157
+ _ , _ , err := NewCommand ("branch" , "-m" ).AddDynamicArguments (from , to ).RunStdString (ctx , & RunOpts {Dir : repo .Path })
158
158
return err
159
159
}
0 commit comments