Skip to content

Commit

Permalink
Merge branch 'ff/svnimport'
Browse files Browse the repository at this point in the history
* ff/svnimport:
  git-svnimport: Improved detection of merges.
  • Loading branch information
Junio C Hamano committed Jun 4, 2006
2 parents b0d6e64 + 65160b8 commit 731651f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions git-svnimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,17 @@ END

our @mergerx = ();
if ($opt_m) {
@mergerx = ( qr/\W(?:from|of|merge|merging|merged) (\w+)/i );
my $branch_esc = quotemeta ($branch_name);
my $trunk_esc = quotemeta ($trunk_name);
@mergerx =
(
qr!\b(?:merg(?:ed?|ing))\b.*?\b((?:(?<=$branch_esc/)[\w\.\-]+)|(?:$trunk_esc))\b!i,
qr!\b(?:from|of)\W+((?:(?<=$branch_esc/)[\w\.\-]+)|(?:$trunk_esc))\b!i,
qr!\b(?:from|of)\W+(?:the )?([\w\.\-]+)[-\s]branch\b!i
);
}
if ($opt_M) {
push (@mergerx, qr/$opt_M/);
unshift (@mergerx, qr/$opt_M/);
}

# Absolutize filename now, since we will have chdir'ed by the time we
Expand Down

0 comments on commit 731651f

Please sign in to comment.