While PublicInbox::Config is responsible for some instances of
setting $git->{nick}, more PublicInbox::Git objects may be
created from loading the cindex and we should do our best to
reuse that memory, too.
Followup-to: 84ed7ec1c887 (dedupe inbox names, coderepo nicks + git dirs, 2024-03-04)
$nick =~ s!$lre!$nick_pfx!s or next;
$dir2cr{$p} = $coderepos->{$nick} //= do {
my $git = PublicInbox::Git->new($p);
- $git->{nick} = $nick; # for git->pub_urls
+ my %dedupe = ($nick => undef);
+ ($git->{nick}) = keys %dedupe; # for git->pub_urls
$git;
};
}