File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -56,22 +56,22 @@ func (gr GitRepo) GetContent() (models.Package, error) {
5656 Owner (owner ).
5757 Repo (repo ).
5858 Branch (branch ).
59- Root (root ).
6059 MaxDepth (gr .MaxDepth ).
6160 RegisterFileInterceptor (fileInterceptor (br )).
6261 RegisterDirInterceptor (dirInterceptor (br ))
63-
64- // Handle recursion
62+ // Handle recursion and depth
63+ effectiveRoot := root
6564 if gr .Recursive {
66- if ! strings .HasSuffix (root , "/**" ) {
67- gw = gw . Root ( root + "/**" )
65+ if ! strings .HasSuffix (effectiveRoot , "/**" ) {
66+ effectiveRoot += "/**"
6867 }
6968 } else {
7069 // If not recursive, ensure root does not end with /** which walker uses to toggle recursion
71- if strings .HasSuffix (root , "/**" ) {
72- gw = gw . Root ( strings .TrimSuffix (root , "/**" ) )
70+ if strings .HasSuffix (effectiveRoot , "/**" ) {
71+ effectiveRoot = strings .TrimSuffix (effectiveRoot , "/**" )
7372 }
7473 }
74+ gw = gw .Root (effectiveRoot )
7575
7676 if version != "" {
7777 gw = gw .ReferenceName (fmt .Sprintf ("refs/tags/%s" , version ))
You can’t perform that action at this time.
0 commit comments