@@ -130,20 +130,20 @@ func (repo *Repository) CreateBranch(ctx context.Context, branch, oldbranchOrCom
130130}
131131
132132// 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 {
134134 cmd := NewCommand ("remote" , "add" )
135135 if fetch {
136136 cmd .AddArguments ("-f" )
137137 }
138138 cmd .AddDynamicArguments (name , url )
139139
140- _ , _ , err := cmd .RunStdString (repo . Ctx , & RunOpts {Dir : repo .Path })
140+ _ , _ , err := cmd .RunStdString (ctx , & RunOpts {Dir : repo .Path })
141141 return err
142142}
143143
144144// 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 })
147147 return err
148148}
149149
@@ -153,7 +153,7 @@ func (branch *Branch) GetCommit() (*Commit, error) {
153153}
154154
155155// 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 })
158158 return err
159159}
0 commit comments