Subject: Re: [PATCH] gitweb: Show project README if available

From: Jakub Narebski <[email-masked]>
Date: Wed, 11 Oct 2006 14:23:00 +0200

Petr "Pasky" Baudis wrote:
> Dear diary, on Tue, Oct 10, 2006 at 11:00:41AM CEST, I got a letter
> where Jakub Narebski <[email-masked]> said that...
> > Petr Baudis wrote:
> > 
> > > +                       print $_ while (<$fd>);
> > 
> > Wouldn't it be better to do it in slurp mode, i.e.
> > 
> >         {
> >                 local $/
> >                 print <$fd>;
> >         }
> > 
> > instead?
> 
> I personally prefer my version as it prevents allocation of big chunks
> of memory, but I don't really care in this particular case.

Can any Perl expert tell us how Perl truly solve this? What is the best
way to dump whole [remaining] contents of file (from filehandle) to STDOUT?

> > Do you assume that README is HTML fragment? If not, you should esc_html it.
> > Besides, we have similar (if assumed to have one line only) file, namely
> > description.
> 
> I _do_ assume that README is HTML fragment (so that you can use links,
> non-proportional fonts, etc.), this is a difference to the description
> file.

Hmmm... perhaps better name would be description_long.html, or description.html
Or at least README.html.

Description could be moved to the config file; your's project README couldn't.

> > Besides, README for a project can be huge. Git README has 589 lines!
> 
> This is not /README from the tree but README in the .git directory, so
> it may not be the same. In the repo.or.cz admin interface, I limit
> README to 8kb.

Sorry. My mistake.
-- 
Jakub Narebski
Poland