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

Method DeleteLocalTag

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

Source from the content-addressed store, hash-verified

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