File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import (
17
17
type cmdQueryBase struct {
18
18
cmd
19
19
20
- Path string `short:"p" long:"path" description:"Path where the git repository is located"`
20
+ Path [] string `short:"p" long:"path" description:"Path where the git repository is located"`
21
21
22
22
engine * sqle.Engine
23
23
name string
@@ -31,15 +31,20 @@ func (c *cmdQueryBase) buildDatabase() error {
31
31
c .print ("opening %q repository...\n " , c .Path )
32
32
33
33
var err error
34
- r , err := gogit .PlainOpen (c .Path )
35
- if err != nil {
36
- return err
37
- }
38
34
39
35
pool := gitquery .NewRepositoryPool ()
40
- pool .Add (c .Path , r )
41
36
42
- c .name = filepath .Base (filepath .Join (c .Path , ".." ))
37
+ for _ , path := range c .Path {
38
+ r , err := gogit .PlainOpen (path )
39
+ if err != nil {
40
+ return err
41
+ }
42
+
43
+ pool .Add (path , r )
44
+
45
+ c .name = filepath .Base (filepath .Join (path , ".." ))
46
+ }
47
+
43
48
c .engine .AddDatabase (gitquery .NewDatabase (c .name , & pool ))
44
49
return err
45
50
}
You can’t perform that action at this time.
0 commit comments