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

Method Status

submodule.go:319–342  ·  view source on GitHub ↗

Status returns the status of the submodules.

()

Source from the content-addressed store, hash-verified

317
318// Status returns the status of the submodules.
319func (s Submodules) Status() (SubmodulesStatus, error) {
320 var list SubmodulesStatus
321
322 var r *Repository
323 for _, sub := range s {
324 if r == nil {
325 r = sub.w.r
326 }
327
328 idx, err := r.Storer.Index()
329 if err != nil {
330 return nil, err
331 }
332
333 status, err := sub.status(idx)
334 if err != nil {
335 return nil, err
336 }
337
338 list = append(list, status)
339 }
340
341 return list, nil
342}
343
344// SubmodulesStatus contains the status for all submodiles in the worktree
345type SubmodulesStatus []*SubmoduleStatus

Callers

nothing calls this directly

Calls 2

IndexMethod · 0.65
statusMethod · 0.45

Tested by

no test coverage detected