PushRevision gets the value of the @{push} revision syntax An error here doesn't necessarily mean something is broken, but may mean that the @{push} revision syntax couldn't be resolved, such as in non-centralized workflows with push.default = simple. Downstream consumers should consider how to hand
(ctx context.Context, branch string)
| 632 | // revision syntax couldn't be resolved, such as in non-centralized workflows with |
| 633 | // push.default = simple. Downstream consumers should consider how to handle this error. |
| 634 | func (c *Client) PushRevision(ctx context.Context, branch string) (RemoteTrackingRef, error) { |
| 635 | revParseOut, err := c.revParse(ctx, "--symbolic-full-name", branch+"@{push}") |
| 636 | if err != nil { |
| 637 | return RemoteTrackingRef{}, err |
| 638 | } |
| 639 | |
| 640 | return parsePushRevision(revParseOut) |
| 641 | } |
| 642 | |
| 643 | func parsePushRevision(revParseOut []byte) (RemoteTrackingRef, error) { |
| 644 | ref, err := ParseRemoteTrackingRef(firstLine(revParseOut)) |
nothing calls this directly
no test coverage detected