(o *CloneOptions, c *config.RemoteConfig, head *plumbing.Reference)
| 1038 | } |
| 1039 | |
| 1040 | func (r *Repository) updateRemoteConfigIfNeeded(o *CloneOptions, c *config.RemoteConfig, head *plumbing.Reference) error { |
| 1041 | if !o.SingleBranch { |
| 1042 | return nil |
| 1043 | } |
| 1044 | |
| 1045 | c.Fetch = r.cloneRefSpec(o) |
| 1046 | |
| 1047 | cfg, err := r.Config() |
| 1048 | if err != nil { |
| 1049 | return err |
| 1050 | } |
| 1051 | |
| 1052 | cfg.Remotes[c.Name] = c |
| 1053 | return r.Storer.SetConfig(cfg) |
| 1054 | } |
| 1055 | |
| 1056 | func (r *Repository) fetchAndUpdateReferences( |
| 1057 | ctx context.Context, o *FetchOptions, ref plumbing.ReferenceName, |
no test coverage detected