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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:

> Jakub Narebski <jnareb@xxxxxxxxx> writes:
> 
>> Jeff King wrote:
>>
>>> On Wed, Oct 11, 2006 at 02:23:00PM +0200, Jakub Narebski wrote:
>>> 
>>>> 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?
>>> 
>>> The same you would in C: read fix-sized buffers and dump them.
>> [...]
>>> Or you can use the File::Copy module, which is part of the standard
>>> distribution (and I believe has been so for all perl5 versions, but I
>>> could be wrong):
>>
>> And 
>>
>>         {
>>                 local $/;
>>                 print <$fd>;
>>         }
>>
>> doesn't do the right thing?
[...]
> You can strace your Perl to see what yours does yourself:
> 
>       strace perl -e 'print <STDIN>' >/dev/null <some-huge-file
> 
> You will see a bunch of read(0, ..., 4096) and after all of that
> finishes, finally you will see a bunch of write(1, ..., 4096).
> Where do you think the data is in the meantime?

Pity that Perl does this that a way.

Should we use File::Copy thorough the gitweb, instead of using slurp mode?
Well, perhaps except small files, like $GIT_DIR/description...

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]