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)
| 576 | // revision syntax couldn't be resolved, such as in non-centralized workflows with |
| 577 | // push.default = simple. Downstream consumers should consider how to handle this error. |
| 578 | func (c *Client) PushRevision(ctx context.Context, branch string) (RemoteTrackingRef, error) { |
| 579 | revParseOut, err := c.revParse(ctx, "--symbolic-full-name", branch+"@{push}") |
| 580 | if err != nil { |
| 581 | return RemoteTrackingRef{}, err |
| 582 | } |
| 583 | |
| 584 | ref, err := ParseRemoteTrackingRef(firstLine(revParseOut)) |
| 585 | if err != nil { |
| 586 | return RemoteTrackingRef{}, fmt.Errorf("could not parse push revision: %v", err) |
| 587 | } |
| 588 | |
| 589 | return ref, nil |
| 590 | } |
| 591 | |
| 592 | func (c *Client) DeleteLocalTag(ctx context.Context, tag string) error { |
| 593 | args := []string{"tag", "-d", tag} |