Load the index and search subtree
This commit is contained in:
parent
b188217e83
commit
d4686ebcc5
1 changed files with 6 additions and 1 deletions
|
@ -94,7 +94,7 @@ func (c CmdFind) findInTree(repo *repository.Repository, id backend.ID, path str
|
||||||
}
|
}
|
||||||
|
|
||||||
if node.Type == "dir" {
|
if node.Type == "dir" {
|
||||||
subdirResults, err := c.findInTree(repo, id, filepath.Join(path, node.Name))
|
subdirResults, err := c.findInTree(repo, *node.Subtree, filepath.Join(path, node.Name))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,11 @@ func (c CmdFind) Execute(args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = repo.LoadIndex()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
c.pattern = args[0]
|
c.pattern = args[0]
|
||||||
|
|
||||||
if c.Snapshot != "" {
|
if c.Snapshot != "" {
|
||||||
|
|
Loading…
Reference in a new issue