(dst io.Writer, path string, _ os.FileInfo)
| 508 | } |
| 509 | |
| 510 | func (w *Worktree) fillEncodedObjectFromFile(dst io.Writer, path string, _ os.FileInfo) (err error) { |
| 511 | src, err := w.Filesystem.Open(path) |
| 512 | if err != nil { |
| 513 | return err |
| 514 | } |
| 515 | |
| 516 | defer ioutil.CheckClose(src, &err) |
| 517 | |
| 518 | if _, err := io.Copy(dst, src); err != nil { |
| 519 | return err |
| 520 | } |
| 521 | |
| 522 | return err |
| 523 | } |
| 524 | |
| 525 | func (w *Worktree) fillEncodedObjectFromSymlink(dst io.Writer, path string, _ os.FileInfo) error { |
| 526 | target, err := w.Filesystem.Readlink(path) |
no test coverage detected