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

Method SetRemoteResolution

git/client.go:209–220  ·  view source on GitHub ↗
(ctx context.Context, name, resolution string)

Source from the content-addressed store, hash-verified

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}
211 cmd, err := c.Command(ctx, args...)
212 if err != nil {
213 return err
214 }
215 _, err = cmd.Output()
216 if err != nil {
217 return err
218 }
219 return nil
220}
221
222// CurrentBranch reads the checked-out branch for the git repository.
223func (c *Client) CurrentBranch(ctx context.Context) (string, error) {

Callers 5

cloneRunFunction · 0.80
forkRunFunction · 0.80
setDefaultRunFunction · 0.80
handlePushFunction · 0.80

Calls 2

CommandMethod · 0.95
OutputMethod · 0.65

Tested by 1