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

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
Previous: Jonathan NiederNext: Eric Wong
Message 9 of 18 in “Make git-svn Use accessors for paths and urls”
  1. Michael G. SchwernJul 27, 2012
  2. 1/5 Make Git::SVN use accessors internally for path.Michael G. Schwern, Jul 27, 2012
  3. Jonathan NiederSep 17, 2012
  4. 1/5 Git::SVN: introduce path accessorJonathan Nieder, Sep 17, 2012
  5. 2/5 Git::SVN: use accessor to read pathJonathan Nieder, Sep 17, 2012
  6. 3/5 Git::SVN: use accessor to write pathJonathan Nieder, Sep 17, 2012
  7. 4/5 Git::SVN::_new: use accessor to write path fieldJonathan Nieder, Sep 17, 2012
  8. 5/5 Git::SVN: rename private path fieldJonathan Nieder, Sep 17, 2012
  9. Junio C HamanoSep 18, 2012
  10. Eric WongSep 18, 2012
  11. 2/5 Make Git::SVN use an accessor for URLs internally.Michael G. Schwern, Jul 27, 2012
  12. 3/5 Make Git::SVN::Ra use an accessor for URLsMichael G. Schwern, Jul 27, 2012
  13. 4/5 Change the rest of the code to use Git::SVN->path instead of the hash directly.Michael G. Schwern, Jul 27, 2012
  14. 5/5 Change the rest of the code to use the Git::SVN and Git::SVN::Ra url accessors.Michael G. Schwern, Jul 27, 2012
  15. Eric WongJul 28, 2012
  16. Jonathan NiederJul 28, 2012
  17. Michael G SchwernJul 28, 2012
  18. Jonathan NiederJul 28, 2012

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.