(o *CloneOptions, c *config.RemoteConfig, _ *plumbing.Reference)
| 1047 | } |
| 1048 | |
| 1049 | func (r *Repository) updateRemoteConfigIfNeeded(o *CloneOptions, c *config.RemoteConfig, _ *plumbing.Reference) error { |
| 1050 | if !o.SingleBranch { |
| 1051 | return nil |
| 1052 | } |
| 1053 | |
| 1054 | c.Fetch = r.cloneRefSpec(o) |
| 1055 | |
| 1056 | cfg, err := r.Config() |
| 1057 | if err != nil { |
| 1058 | return err |
| 1059 | } |
| 1060 | |
| 1061 | cfg.Remotes[c.Name] = c |
| 1062 | return r.Storer.SetConfig(cfg) |
| 1063 | } |
| 1064 | |
| 1065 | func (r *Repository) fetchAndUpdateReferences( |
| 1066 | ctx context.Context, o *FetchOptions, ref plumbing.ReferenceName, |
no test coverage detected