1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-01 22:56:10 +02:00

git-svn: fix regex to remove "tail" from svn tags

Fix a regular expression used to remove the revision from the
end of an svn tag or branch name.  The regex did not account for
any "tail" (dashes) that may have been added to the end of the
tag name (which first appeared in v1.4.1-rc2~11).  If not fixed,
tags with names like "tags/mytag@5--@2" may be created.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
David D. Kilzer 2010-08-15 06:15:54 -07:00 committed by Eric Wong
parent 3d04589758
commit 54fb7f9b08

View File

@ -2959,7 +2959,7 @@ sub other_gs {
my $gs = Git::SVN->find_by_url($new_url, $url, $branch_from);
unless ($gs) {
my $ref_id = $old_ref_id;
$ref_id =~ s/\@\d+$//;
$ref_id =~ s/\@\d+-*$//;
$ref_id .= "\@$r";
# just grow a tail if we're not unique enough :x
$ref_id .= '-' while find_ref($ref_id);