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

Method UpdateRemoteURL

git/client.go:196–207  ·  view source on GitHub ↗
(ctx context.Context, name, url string)

Source from the content-addressed store, hash-verified

194}
195
196func (c *Client) UpdateRemoteURL(ctx context.Context, name, url string) error {
197 args := []string{"remote", "set-url", name, url}
198 cmd, err := c.Command(ctx, args...)
199 if err != nil {
200 return err
201 }
202 _, err = cmd.Output()
203 if err != nil {
204 return err
205 }
206 return nil
207}
208
209func (c *Client) SetRemoteResolution(ctx context.Context, name, resolution string) error {
210 args := []string{"config", "--add", fmt.Sprintf("remote.%s.gh-resolved", name), resolution}

Callers 2

updateRemoteFunction · 0.80

Calls 2

CommandMethod · 0.95
OutputMethod · 0.65

Tested by 1