(path string, all bool)
| 535 | } |
| 536 | |
| 537 | func cleanUpDir(path string, all bool) error { |
| 538 | if all { |
| 539 | return util.RemoveAll(osfs.Default, path) |
| 540 | } |
| 541 | |
| 542 | files, err := osfs.Default.ReadDir(path) |
| 543 | if err != nil { |
| 544 | return err |
| 545 | } |
| 546 | |
| 547 | for _, fi := range files { |
| 548 | if err := util.RemoveAll(osfs.Default, osfs.Default.Join(path, fi.Name())); err != nil { |
| 549 | return err |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | return err |
| 554 | } |
| 555 | |
| 556 | // Config return the repository config. In a filesystem backed repository this |
| 557 | // means read the `.git/config`. |
no test coverage detected
searching dependent graphs…