mirror of
https://github.com/grdl/git-get.git
synced 2026-02-08 15:09:19 +00:00
Refactor repoFinder
- Remove io package and move finder to git package - Move tempDir and writeFile into test package. They are only used for testing purposes anyway. - Add a way to specify parent folder for tempDir. Useful for testing nested repos. - Add new test repos with .git/config files
This commit is contained in:
@@ -3,7 +3,7 @@ package pkg
|
||||
import (
|
||||
"fmt"
|
||||
"git-get/pkg/cfg"
|
||||
"git-get/pkg/io"
|
||||
"git-get/pkg/git"
|
||||
"git-get/pkg/print"
|
||||
"sort"
|
||||
"strings"
|
||||
@@ -18,7 +18,7 @@ type ListCfg struct {
|
||||
|
||||
// List executes the "git list" command.
|
||||
func List(c *ListCfg) error {
|
||||
paths, err := io.NewRepoFinder(c.Root).Find()
|
||||
paths, err := git.NewRepoFinder(c.Root).Find()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user