Re: [PATCH/RFC 5/5] Git::SVN: rename private path field
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Sep 18, 2012, 00:07 UTC
- Message-ID
- <20120918000737.GA17939@dcvr.yhbt.net>
- In-Reply-To
- <20120917091331.GF358@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 5 quoted lines
> All users of $gs->{path} should have been converted to use the
> accessor by now. Check our work by renaming the underlying variable
> to break callers that try to use it directly.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>I think this is a good patch for master, too. Thanks.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
> --- > perl/Git/SVN.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > --
I'll apply the following (on top of a patch which fixes some {path} usages):
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm index 88b9164..59215fa 100644 --- a/perl/Git/SVN.pm +++ b/perl/Git/SVN.pm @@ -2331,11 +2331,11 @@ sub path { if (@_) { my $path = shift; - $self->{path} = canonicalize_path($path); + $self->{_path} = canonicalize_path($path); return; } - return $self->{path}; + return $self->{_path}; } sub url {