All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: Dennis Schridde <devurandom@gmx.net>, git@vger.kernel.org
Subject: Re: [PATCH] git-svn: handle leading/trailing whitespace from svnsync revprops
Date: Sat, 12 Jan 2008 10:57:32 -0800	[thread overview]
Message-ID: <7vprw6ub1f.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080112091242.GA27109@soma> (Eric Wong's message of "Sat, 12 Jan 2008 01:12:42 -0800")

Eric Wong <normalperson@yhbt.net> 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.

  parent reply	other threads:[~2008-01-12 18:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 16:38 Odd number of elements in anonymous hash Dennis Schridde
2008-01-08 17:21 ` Junio C Hamano
2008-01-08 17:30   ` Dennis Schridde
2008-01-10  8:38     ` Eric Wong
2008-01-10 11:04       ` Dennis Schridde
2008-01-10 17:13         ` Dennis Schridde
2008-01-10 20:08           ` Junio C Hamano
2008-01-10 21:13             ` Dennis Schridde
2008-01-10 21:45               ` Junio C Hamano
2008-01-12  7:13                 ` [PATCH] git-svn: handle leading/trailing whitespace from svnsync revprops Eric Wong
2008-01-12  7:57                   ` Junio C Hamano
2008-01-12  9:12                     ` Eric Wong
2008-01-12  9:55                       ` Björn Steinbrink
2008-01-12 18:57                       ` Junio C Hamano [this message]
2008-01-12 19:31                         ` Junio C Hamano
2008-01-12 12:34                   ` Dennis Schridde
2008-01-09 22:58   ` Odd number of elements in anonymous hash Eric Wong
     [not found] ` <200801240037.33908.devurandom@gmx.net>
     [not found]   ` <4797E894.8060706@vilain.net>
     [not found]     ` <200801241513.45088.devurandom@gmx.net>
2008-01-24 23:10       ` Sam Vilain

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=7vprw6ub1f.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=devurandom@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.