diff options
author | Eric Wong <e@80x24.org> | 2022-10-04 19:12:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-10-05 21:15:27 +0000 |
commit | ef39974fec81e2f776390965b739a0b37f6a0646 (patch) | |
tree | 4bbe8e7398828727e3efa2a47a4b3c15f6c5e252 /lib/PublicInbox/Git.pm | |
parent | 87e742835126e37d8f09c35321f9dd07f233dd45 (diff) | |
download | public-inbox-ef39974fec81e2f776390965b739a0b37f6a0646.tar.gz |
git: allow ->local_nick to return undef
It'll be used directly (outside of ->pub_urls) in the standalone coderepo viewer for tarball snapshots.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 395add1f..691462ed 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -451,7 +451,7 @@ sub DESTROY { cleanup(@_) } sub local_nick ($) { # don't show full FS path, basename should be OK: - $_[0]->{git_dir} =~ m!/([^/]+?)(?:/*\.git/*)?\z! ? "$1.git" : '???'; + $_[0]->{git_dir} =~ m!/([^/]+?)(?:/*\.git/*)?\z! ? "$1.git" : undef; } sub host_prefix_url ($$) { @@ -478,7 +478,7 @@ sub pub_urls { if (my $urls = $self->{cgit_url}) { return map { host_prefix_url($env, $_) } @$urls; } - (local_nick($self)); + (local_nick($self) // '???'); } sub cat_async_begin { |