Skip to content

Commit 9a4b64d

Browse files
authored
Fix DirectoriesContainingFile query (#604)
Rev and repo name were shifted, this probably returned no results at all times.
1 parent 8106c66 commit 9a4b64d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/batches/service/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ func (svc *Service) FindDirectoriesInRepos(ctx context.Context, fileName string,
653653
a.WriteString("query DirectoriesContainingFile {\n")
654654

655655
for _, repo := range batch {
656-
query := fmt.Sprintf(`file:(^|/)%s$ repo:^%s$@%s type:path count:99999`, regexp.QuoteMeta(fileName), repo.Rev(), regexp.QuoteMeta(repo.Name))
656+
query := fmt.Sprintf(`file:(^|/)%s$ repo:^%s$@%s type:path count:99999`, regexp.QuoteMeta(fileName), regexp.QuoteMeta(repo.Name), repo.Rev())
657657

658658
a.WriteString(fmt.Sprintf(searchQueryTmpl, queryIDByRepo[repo], query))
659659
}

0 commit comments

Comments
 (0)