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

Method fillEncodedObjectFromSymlink

worktree_status.go:525–533  ·  view source on GitHub ↗
(dst io.Writer, path string, _ os.FileInfo)

Source from the content-addressed store, hash-verified

523}
524
525func (w *Worktree) fillEncodedObjectFromSymlink(dst io.Writer, path string, _ os.FileInfo) error {
526 target, err := w.Filesystem.Readlink(path)
527 if err != nil {
528 return err
529 }
530
531 _, err = dst.Write([]byte(target))
532 return err
533}
534
535func (w *Worktree) addOrUpdateFileToIndex(idx *index.Index, filename string, h plumbing.Hash) error {
536 e, err := idx.Entry(filename)

Callers 1

copyFileToStorageMethod · 0.95

Calls 2

ReadlinkMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected