(path string)
| 636 | } |
| 637 | |
| 638 | func (w *Worktree) removeEmptyDirectory(path string) error { |
| 639 | files, err := w.Filesystem.ReadDir(path) |
| 640 | if err != nil { |
| 641 | return err |
| 642 | } |
| 643 | |
| 644 | if len(files) != 0 { |
| 645 | return nil |
| 646 | } |
| 647 | |
| 648 | return w.Filesystem.Remove(path) |
| 649 | } |
| 650 | |
| 651 | func (w *Worktree) doRemoveFile(idx *index.Index, path string) (plumbing.Hash, error) { |
| 652 | hash, err := w.deleteFromIndex(idx, path) |
no test coverage detected