MCPcopy
hub / github.com/go-git/go-git / doRecursiveUpdate

Method doRecursiveUpdate

submodule.go:286–306  ·  view source on GitHub ↗
(ctx context.Context, r *Repository, o *SubmoduleUpdateOptions)

Source from the content-addressed store, hash-verified

284}
285
286func (s *Submodule) doRecursiveUpdate(ctx context.Context, r *Repository, o *SubmoduleUpdateOptions) error {
287 if o.RecurseSubmodules == NoRecurseSubmodules {
288 return nil
289 }
290
291 w, err := r.Worktree()
292 if err != nil {
293 return err
294 }
295
296 l, err := w.Submodules()
297 if err != nil {
298 return err
299 }
300
301 new := &SubmoduleUpdateOptions{}
302 *new = *o
303
304 new.RecurseSubmodules--
305 return l.UpdateContext(ctx, new)
306}
307
308func (s *Submodule) fetchAndCheckout(
309 ctx context.Context, r *Repository, o *SubmoduleUpdateOptions, hash plumbing.Hash,

Callers 1

updateMethod · 0.95

Calls 3

WorktreeMethod · 0.80
SubmodulesMethod · 0.80
UpdateContextMethod · 0.45

Tested by

no test coverage detected