Re: [PATCH/RFC 5/5] Git::SVN: rename private path field
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 18, 2012, 00:00 UTC
- Message-ID
- <7vboh4qjwo.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120917091331.GF358@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 6 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 like this ;-) If we know we have good coverage, this would be a sensible way to catch remaining code that hasn't been converted.
Show 21 quoted lines
> perl/Git/SVN.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
> index 3aa20109..33f15682 100644
> --- a/perl/Git/SVN.pm
> +++ b/perl/Git/SVN.pm
> @@ -2293,11 +2293,11 @@ sub path {
>
> if (@_) {
> my $path = shift;
> - $self->{path} = $path;
> + $self->{_path} = $path;
> return;
> }
>
> - return $self->{path};
> + return $self->{_path};
> }
>
> # for read-only access of old .rev_db formats