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

Re: [PATCH] git-svn: handle leading/trailing whitespace from svnsync revprops

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 12, 2008, 18:57 UTC
Message-ID
<7vprw6ub1f.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080112091242.GA27109@soma>
Eric Wong <normalperson@yhbt.net> writes:
Show 6 quoted lines
> The statements are not equivalent, however.  I'd have to add
>
> 	$var = $1;
>
> too, because I needed to extract what was inside the ( ) since the '$'
> doesn't catch the trailing newline, either.
Ahh, _stupid me_.

Yes, you said '$', not '\Z', but somehow I mistook m|^(.*)$| as a no-op "whole thing". Sorry.

Show 6 quoted lines
> Good points, I've been mindlessly taking "interesting" things from other
> Perl code I've seen over the years and using it in my own without
> thinking about it too hard :x
>
> I'll avoid them in the future.  Unfortunately, Git.pm also suffers from
> this as well.

Git.pm is even worse. It uses the line-noise prototype which is a very good and cute hack to allow people to (1) emulate Perl's built-in and (2) come up with syntax sugars, but has a similar issue that defeats old-school intuition as wantarray-return subroutines does.

The caller needs to be careful about receiving return values with wantarray-return subroutines. The caller needs to be careful about how to send in the parameters with line-noise prototyped subs.

In any case, this kind of clean-up is not within the scope of changes during rc cycle. I'll take your bugfix as is.

Thanks.
Previous: Björn SteinbrinkNext: Junio C Hamano
Message 14 of 18 in “Odd number of elements in anonymous hash”
  1. Dennis SchriddeJan 8, 2008
  2. Junio C HamanoJan 8, 2008
  3. Dennis SchriddeJan 8, 2008
  4. Eric WongJan 10, 2008
  5. Dennis SchriddeJan 10, 2008
  6. Dennis SchriddeJan 10, 2008
  7. Junio C HamanoJan 10, 2008
  8. Dennis SchriddeJan 10, 2008
  9. Junio C HamanoJan 10, 2008
  10. git-svn: handle leading/trailing whitespace from svnsync revpropsEric Wong, Jan 12, 2008
  11. Junio C HamanoJan 12, 2008
  12. Eric WongJan 12, 2008
  13. Björn SteinbrinkJan 12, 2008
  14. Junio C HamanoJan 12, 2008
  15. Junio C HamanoJan 12, 2008
  16. Dennis SchriddeJan 12, 2008
  17. Eric WongJan 9, 2008
  18. Sam VilainJan 24, 2008

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.