git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Show project README if available
Date: Wed, 11 Oct 2006 22:33:46 +0200	[thread overview]
Message-ID: <egjkf8$ht$2@sea.gmane.org> (raw)
In-Reply-To: 7v3b9utzqi.fsf@assigned-by-dhcp.cox.net

Junio C Hamano wrote:

> Jakub Narebski <jnareb@gmail.com> 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

      reply	other threads:[~2006-10-11 20:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10  2:56 [PATCH] gitweb: Show project README if available Petr Baudis
2006-10-10  3:20 ` Junio C Hamano
2006-10-10  4:33   ` Junio C Hamano
2006-10-10 10:55     ` Petr Baudis
2006-10-10 11:21       ` Jakub Narebski
2006-10-10 14:25     ` Horst H. von Brand
2006-10-10  5:15 ` Luben Tuikov
2006-10-10  8:33   ` Andreas Ericsson
2006-10-10  9:00 ` Jakub Narebski
2006-10-10 10:41   ` Petr Baudis
2006-10-11 12:23     ` Jakub Narebski
2006-10-11 18:17       ` Jeff King
2006-10-11 18:46         ` Jakub Narebski
2006-10-11 19:32           ` Junio C Hamano
2006-10-11 20:33             ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='egjkf8$ht$2@sea.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).