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)
| 1223 | // operation is complete, an error is returned. The context only affects the |
| 1224 | // transport operations. |
| 1225 | func (r *Repository) PushContext(ctx context.Context, o *PushOptions) error { |
| 1226 | if err := o.Validate(); err != nil { |
| 1227 | return err |
| 1228 | } |
| 1229 | |
| 1230 | remote, err := r.Remote(o.RemoteName) |
| 1231 | if err != nil { |
| 1232 | return err |
| 1233 | } |
| 1234 | |
| 1235 | return remote.PushContext(ctx, o) |
| 1236 | } |
| 1237 | |
| 1238 | // Log returns the commit history from the given LogOptions. |
| 1239 | func (r *Repository) Log(o *LogOptions) (object.CommitIter, error) { |