MCPcopy
hub / github.com/cli/cli / DeleteLocalTag

Method DeleteLocalTag

git/client.go:592–603  ·  view source on GitHub ↗
(ctx context.Context, tag string)

Source from the content-addressed store, hash-verified

590}
591
592func (c *Client) DeleteLocalTag(ctx context.Context, tag string) error {
593 args := []string{"tag", "-d", tag}
594 cmd, err := c.Command(ctx, args...)
595 if err != nil {
596 return err
597 }
598 _, err = cmd.Output()
599 if err != nil {
600 return err
601 }
602 return nil
603}
604
605func (c *Client) DeleteLocalBranch(ctx context.Context, branch string) error {
606 args := []string{"branch", "-D", branch}

Callers 2

TestClientDeleteLocalTagFunction · 0.95
deleteRunFunction · 0.80

Calls 2

CommandMethod · 0.95
OutputMethod · 0.65

Tested by 1

TestClientDeleteLocalTagFunction · 0.76