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)
| 638 | // revision syntax couldn't be resolved, such as in non-centralized workflows with |
| 639 | // push.default = simple. Downstream consumers should consider how to handle this error. |
| 640 | func (c *Client) PushRevision(ctx context.Context, branch string) (RemoteTrackingRef, error) { |
| 641 | revParseOut, err := c.revParse(ctx, "--symbolic-full-name", branch+"@{push}") |
| 642 | if err != nil { |
| 643 | return RemoteTrackingRef{}, err |
| 644 | } |
| 645 | |
| 646 | ref, err := ParseRemoteTrackingRef(firstLine(revParseOut)) |
| 647 | if err != nil { |
| 648 | return RemoteTrackingRef{}, fmt.Errorf("could not parse push revision: %v", err) |
| 649 | } |
| 650 | |
| 651 | return ref, nil |
| 652 | } |
| 653 | |
| 654 | func (c *Client) DeleteLocalTag(ctx context.Context, tag string) error { |
| 655 | args := []string{"tag", "-d", tag} |