MCPcopy
hub / github.com/cli/cli / UpdateRemoteURL

Method UpdateRemoteURL

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

Source from the content-addressed store, hash-verified

193}
194
195func (c *Client) UpdateRemoteURL(ctx context.Context, name, url string) error {
196 args := []string{"remote", "set-url", name, url}
197 cmd, err := c.Command(ctx, args...)
198 if err != nil {
199 return err
200 }
201 _, err = cmd.Output()
202 if err != nil {
203 return err
204 }
205 return nil
206}
207
208func (c *Client) SetRemoteResolution(ctx context.Context, name, resolution string) error {
209 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