Skip to content

Commit

Permalink
git-svn: remove check_path calls before calling do_update
Browse files Browse the repository at this point in the history
These checks were needed before git-svn got smarter about
match_paths() and using path information returned by get_log().
We also have extra checking against fetching revisions
out-of-order these days; so we don't have to worry about that as
much.  We also check for tree deletions in match_paths() and
skip those as well.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Eric Wong committed Feb 23, 2007
1 parent b9dffd8 commit d542aed
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,9 @@ sub do_git_commit {

sub match_paths {
my ($self, $paths, $r) = @_;
if (my $path = $paths->{"/$self->{path}"}) {
return ($path->{action} eq 'D') ? 0 : 1;
}
$self->{path_regex} ||= qr/^\/\Q$self->{path}\E\/?/;
if (grep /$self->{path_regex}/, keys %$paths) {
return 1;
Expand Down Expand Up @@ -2394,14 +2397,6 @@ sub gs_do_update {
my $new = ($rev_a == $rev_b);
my $path = $gs->{path};

my $ta = $self->check_path($path, $rev_a);
my $tb = $new ? $ta : $self->check_path($path, $rev_b);
return 1 if ($tb != $SVN::Node::dir && $ta != $SVN::Node::dir);
if ($ta == $SVN::Node::none) {
$rev_a = $rev_b;
$new = 1;
}

my $pool = SVN::Pool->new;
$editor->set_path_strip($path);
my (@pc) = split m#/#, $path;
Expand Down

0 comments on commit d542aed

Please sign in to comment.