MCPcopy Create free account
hub / github.com/cli/cli / DeleteLocalTag

Method DeleteLocalTag

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

Source from the content-addressed store, hash-verified

652}
653
654func (c *Client) DeleteLocalTag(ctx context.Context, tag string) error {
655 args := []string{"tag", "-d", tag}
656 cmd, err := c.Command(ctx, args...)
657 if err != nil {
658 return err
659 }
660 _, err = cmd.Output()
661 if err != nil {
662 return err
663 }
664 return nil
665}
666
667func (c *Client) DeleteLocalBranch(ctx context.Context, branch string) error {
668 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