From: Junio C Hamano Date: Sat, 12 Jan 2008 18:57:32 GMT Subject: Re: [PATCH] git-svn: handle leading/trailing whitespace from svnsync revprops Message-ID: <7vprw6ub1f.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080112091242.GA27109@soma> Eric Wong writes: > 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. > 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.