dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] cindex: load join data for ->ALL, too
@ 2023-11-28 17:37 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-11-28 17:37 UTC (permalink / raw)
  To: spew

---
 lib/PublicInbox/CodeSearch.pm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/PublicInbox/CodeSearch.pm b/lib/PublicInbox/CodeSearch.pm
index fbd9cd52..60deb2ae 100644
--- a/lib/PublicInbox/CodeSearch.pm
+++ b/lib/PublicInbox/CodeSearch.pm
@@ -339,6 +339,15 @@ EOM
 		my $s = $git->{ibx_score};
 		@$s = sort { $b->[0] <=> $a->[0] } @$s if $s;
 	}
+	my $ALL = $pi_cfg->ALL or return;
+	my @alls_gits = sort {
+		scalar @{$b->{ibx_score} // []} <=>
+			scalar @{$a->{ibx_score} // []}
+	} values %$coderepos;
+	my $gits = $ALL->{-repo_objs} //= [];
+	push @$gits, @alls_gits;
+	my $cr_score = $ALL->{-cr_score} //= {};
+	$cr_score->{$_->{nick}} //= scalar(@{$_->{ibx_score}//[]}) for @$gits;
 }
 
 sub repos_sorted {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-28 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 17:37 [PATCH] cindex: load join data for ->ALL, too Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).