PushContext performs a push to the remote. Returns NoErrAlreadyUpToDate if the remote was already up-to-date, from the remote named as FetchOptions.RemoteName. The provided Context must be non-nil. If the context expires before the operation is complete, an error is returned. The context only affec
(ctx context.Context, o *PushOptions)
| 1232 | // operation is complete, an error is returned. The context only affects the |
| 1233 | // transport operations. |
| 1234 | func (r *Repository) PushContext(ctx context.Context, o *PushOptions) error { |
| 1235 | if err := o.Validate(); err != nil { |
| 1236 | return err |
| 1237 | } |
| 1238 | |
| 1239 | remote, err := r.Remote(o.RemoteName) |
| 1240 | if err != nil { |
| 1241 | return err |
| 1242 | } |
| 1243 | |
| 1244 | return remote.PushContext(ctx, o) |
| 1245 | } |
| 1246 | |
| 1247 | // Log returns the commit history from the given LogOptions. |
| 1248 | func (r *Repository) Log(o *LogOptions) (object.CommitIter, error) { |