git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-cvsimport: add suport for CVS pserver method HTTP/1.x proxying

From
MCMartin Langhoff (CatalystIT) <martin@catalyst.net.nz>
Date
Nov 23, 2006, 22:09 UTC
Message-ID
<45661C36.9010101@catalyst.net.nz>
In-Reply-To
<7v64d5keke.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 6 quoted lines
> Except that this statement made me go "huh?" wondering what it
> would do to the $filehandle to evaluate <$filehandle> in a void
> context:
> 
> +			# Skip the empty line of the proxy server output
> +			<$s>;

It's a perl idiom that will discard one line of the $filehandle. If we are 200% certain that it is empty, then it's fine. OTOH, it may well be a bug in the particular proxy implementation Iñaki is using -- I don't know enough about CVS proxying to tell.

> The "I/O Operators" section talks about evaluating <$s> in a
> scalar context (i.e. "$rep = <$s>"), which we all know would
> return a single line, and in list context, which swallows

This is in scalar context, and that's safe to rely on. Whether it is clear enough in this non-Perl-native project... is a good flamewar waiting to happen :-)

cheers,
martin
-- 
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224                              MOB: +64(21)364-017
       Make things as simple as possible, but no simpler - Einstein
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 19 in “git-cvsimport: add suport for CVS pserver method HTTP/1.x proxying”
  1. git-cvsimport: add suport for CVS pserver method HTTP/1.x proxyingInaki Arenaza, Nov 22, 2006
  2. Junio C HamanoNov 23, 2006
  3. Martin Langhoff (CatalystIT)Nov 23, 2006
  4. Junio C HamanoNov 23, 2006
  5. Martin Langhoff (CatalystIT)Nov 23, 2006
  6. Martin LanghoffNov 23, 2006
  7. Junio C HamanoNov 24, 2006
  8. Ignacio ArenazaNov 25, 2006
  9. Jeff KingNov 24, 2006
  10. Junio C HamanoNov 24, 2006
  11. Ignacio ArenazaNov 24, 2006
  12. Ignacio ArenazaNov 24, 2006
  13. Junio C HamanoNov 24, 2006
  14. Ignacio ArenazaNov 24, 2006
  15. Junio C HamanoNov 24, 2006
  16. Ignacio ArenazaNov 27, 2006
  17. Jeff KingNov 24, 2006
  18. Christian CouderNov 24, 2006
  19. Ignacio ArenazaNov 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.