diff options
author | Eric Wong <e@80x24.org> | 2014-04-21 10:43:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-21 10:43:59 +0000 |
commit | 788db1ec53c00b1a1a9457dc156bc7990736e88e (patch) | |
tree | f3d12055bf141e23b379a466d2eb6f76cc4eb7c2 /lib | |
parent | bbe5d24accf4f10af1a9a5ae46df10604c1410f5 (diff) | |
download | public-inbox-788db1ec53c00b1a1a9457dc156bc7990736e88e.tar.gz |
Do not repeat ourselves, just use the same description file gitweb uses to avoid surprising users.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Config.pm | 2 | ||||
-rw-r--r-- | lib/PublicInbox/Feed.pm | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index d71bc52e..32bd9ab6 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -57,7 +57,7 @@ sub lookup { defined $pfx or return; my %rv; - foreach my $k (qw(mainrepo description address)) { + foreach my $k (qw(mainrepo address)) { my $v = $self->{"$pfx.$k"}; $rv{$k} = $v if defined $v; } diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 4671323c..8cc8b728 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -200,9 +200,13 @@ sub get_feedopts { my $listname = $args->{listname}; my $cgi = $args->{cgi}; my %rv; + if (open my $fh, '<', "$args->{git_dir}/description") { + chomp($rv{description} = <$fh>); + close $fh; + } if ($pi_config && defined $listname && length $listname) { - foreach my $key (qw(description address)) { + foreach my $key (qw(address)) { $rv{$key} = $pi_config->get($listname, $key) || ""; } } |