MCPcopy Create free account
hub / github.com/go-git/go-git / UpdateContext

Method UpdateContext

submodule.go:178–180  ·  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

176// operation is complete, an error is returned. The context only affects the
177// transport operations.
178func (s *Submodule) UpdateContext(ctx context.Context, o *SubmoduleUpdateOptions) error {
179 return s.update(ctx, o, plumbing.ZeroHash)
180}
181
182func (s *Submodule) update(ctx context.Context, o *SubmoduleUpdateOptions, forceHash plumbing.Hash) error {
183 if !s.initialized && !o.Init {

Callers 3

UpdateMethod · 0.95
UpdateContextMethod · 0.45

Calls 1

updateMethod · 0.95

Tested by 1