Roman Kagan <rkagan@xxxxxxx> writes: > --- a/perl/Git/SVN/Editor.pm > +++ b/perl/Git/SVN/Editor.pm > @@ -304,8 +304,9 @@ sub C { > my ($self, $m, $deletions) = @_; > my ($dir, $file) = split_path($m->{file_b}); > my $pbat = $self->ensure_path($dir, $deletions); > + my $upa = $self->url_path($m->{file_a}); > my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat, > - $self->url_path($m->{file_a}), $self->{r}); > + $upa, $self->{r}); > print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q; > $self->chg_file($fbat, $m); > $self->close_file($fbat,undef,$self->{pool}); > @@ -323,8 +324,9 @@ sub R { > my ($self, $m, $deletions) = @_; > my ($dir, $file) = split_path($m->{file_b}); > my $pbat = $self->ensure_path($dir, $deletions); > + my $upa = $self->url_path($m->{file_a}); > my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat, > - $self->url_path($m->{file_a}), $self->{r}); > + $upa, $self->{r}); > print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q; > $self->apply_autoprops($file, $fbat); > $self->chg_file($fbat, $m); > > > What it does is store the value to be passed to add_file() in a local > variable, and rely on perl to keep it alive through the end of function > scope, beyond the call to close_file() where it's actually used. > > I'm going to submit a patch adding apr_pstrdup() to subversion folks. > Meanwhile if people find the above workarond a sensible thing to do in > git, I can submit a properly formed patch here too. If you go this way, please add a comment that explains why we need the local variable. -- Thomas Rast tr@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html