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

Method UpdateContext

submodule.go:244–246  ·  view source on GitHub ↗

UpdateContext the registered submodule to match what the superproject expects, the submodule should be initialized first calling the Init method or setting in the options SubmoduleUpdateOptions.Init equals true. The provided Context must be non-nil. If the context expires before the operation is co

(ctx context.Context, o *SubmoduleUpdateOptions)

Source from the content-addressed store, hash-verified

242// operation is complete, an error is returned. The context only affects the
243// transport operations.
244func (s *Submodule) UpdateContext(ctx context.Context, o *SubmoduleUpdateOptions) error {
245 return s.update(ctx, o, plumbing.ZeroHash)
246}
247
248func (s *Submodule) update(ctx context.Context, o *SubmoduleUpdateOptions, forceHash plumbing.Hash) error {
249 if !s.initialized && !o.Init {

Callers 5

UpdateMethod · 0.95
updateSubmodulesMethod · 0.45
doRecursiveUpdateMethod · 0.45
UpdateContextMethod · 0.45

Calls 1

updateMethod · 0.95

Tested by 1