File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,25 @@ func TestSquashCorrectness(t *testing.T) {
351351 ON r.commit_hash = c.commit_hash
352352 AND r.ref_name = c.ref_name
353353 AND c.repository_id = r.repository_id` ,
354+
355+ `SELECT COUNT(r.*) as repos FROM repositories r` ,
356+
357+ `SELECT repository_id, num_files FROM (
358+ SELECT COUNT(f.*) num_files, f.repository_id
359+ FROM ref_commits r
360+ INNER JOIN commit_files cf
361+ ON r.commit_hash = cf.commit_hash
362+ AND r.repository_id = cf.repository_id
363+ INNER JOIN files f
364+ ON cf.repository_id = f.repository_id
365+ AND cf.blob_hash = f.blob_hash
366+ AND cf.tree_hash = f.tree_hash
367+ AND cf.file_path = f.file_path
368+ WHERE r.ref_name = 'HEAD'
369+ GROUP BY f.repository_id
370+ ) t
371+ ORDER BY num_files DESC
372+ LIMIT 10` ,
354373 }
355374
356375 for _ , q := range queries {
You can’t perform that action at this time.
0 commit comments