MCPcopy
hub / github.com/cli/cli / SetRemoteResolution

Method SetRemoteResolution

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

Source from the content-addressed store, hash-verified

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