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

Method new

status.go:111–119  ·  view source on GitHub ↗
(w *Worktree)

Source from the content-addressed store, hash-verified

109)
110
111func (s StatusStrategy) new(w *Worktree) (Status, error) {
112 switch s {
113 case Preload:
114 return preloadStatus(w)
115 case Empty:
116 return make(Status), nil
117 }
118 return nil, fmt.Errorf("%w: %+v", ErrUnsupportedStatusStrategy, s)
119}
120
121func preloadStatus(w *Worktree) (Status, error) {
122 idx, err := w.r.Storer.Index()

Callers 1

statusMethod · 0.80

Calls 1

preloadStatusFunction · 0.85

Tested by

no test coverage detected