diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-31 14:26:39 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-31 14:26:39 -0700 |
commit | 100c25f3cf7ddf3d47c39fb721b20424bd78c650 (patch) | |
tree | c4a0cd4264166f61f24efab6496523f2ab40af73 /git-svnimport.perl | |
parent | Merge branch 'lt/tree-2' into next (diff) | |
parent | git-svnimport: Improved detection of merges. (diff) | |
download | tgif-100c25f3cf7ddf3d47c39fb721b20424bd78c650.tar.xz |
Merge branch 'ff/svnimport' into next
* ff/svnimport:
git-svnimport: Improved detection of merges.
Improved pack format documentation.
git_exec_path, execv_git_cmd: ignore empty environment variables
execv_git_cmd: Fix stack buffer overflow.
Fixed Cygwin CR-munging problem in mailsplit
Diffstat (limited to 'git-svnimport.perl')
-rwxr-xr-x | git-svnimport.perl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/git-svnimport.perl b/git-svnimport.perl index 61f559f0a8..38ac732ca9 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -63,10 +63,17 @@ my $svn_dir = $ARGV[1]; 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 |