(path string)
| 607 | } |
| 608 | |
| 609 | func (w *Worktree) removeEmptyDirectory(path string) error { |
| 610 | files, err := w.Filesystem.ReadDir(path) |
| 611 | if err != nil { |
| 612 | return err |
| 613 | } |
| 614 | |
| 615 | if len(files) != 0 { |
| 616 | return nil |
| 617 | } |
| 618 | |
| 619 | return w.Filesystem.Remove(path) |
| 620 | } |
| 621 | |
| 622 | func (w *Worktree) doRemoveFile(idx *index.Index, path string) (plumbing.Hash, error) { |
| 623 | hash, err := w.deleteFromIndex(idx, path) |
no test coverage detected