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

Method doAddFileToIndex

worktree_status.go:529–531  ·  view source on GitHub ↗
(idx *index.Index, filename string, h plumbing.Hash)

Source from the content-addressed store, hash-verified

527}
528
529func (w *Worktree) doAddFileToIndex(idx *index.Index, filename string, h plumbing.Hash) error {
530 return w.doUpdateFileToIndex(idx.Add(filename), filename, h)
531}
532
533func (w *Worktree) doUpdateFileToIndex(e *index.Entry, filename string, h plumbing.Hash) error {
534 info, err := w.Filesystem.Lstat(filename)

Callers 1

Calls 2

doUpdateFileToIndexMethod · 0.95
AddMethod · 0.45

Tested by

no test coverage detected