From 01574fe596bceae54f8ead45991b9ac4fe35ea10 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 May 2020 23:09:03 +0000 Subject: [PATCH] wwwlisting: utf8::decode before undef Assisted by commit a73957b5b05f2a00f7a85353b1658b6d8cde05ae ("testcommon: speed up wait_for_tail() on GNU/Linux") Fixes: 846161e3d1207d59 ("treat $INBOX_DIR/description and gitweb.owner as UTF-8") --- lib/PublicInbox/WwwListing.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index a416d24f..a3d4e2b3 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -157,10 +157,10 @@ sub manifest_add ($$;$$) { chomp(my $owner = $git->qx('config', 'gitweb.owner')); chomp(my $desc = try_cat("$git_dir/description")); + utf8::decode($owner); + utf8::decode($desc); $owner = undef if $owner eq ''; $desc = 'Unnamed repository' if $desc eq ''; - utf8::decode($desc); - utf8::decode($owner); # templates/hooks--update.sample and git-multimail in git.git # only match "Unnamed repository", not the full contents of -- 2.44.0