From: David D. Kilzer Date: Sun, 15 Aug 2010 13:15:54 +0000 (-0700) Subject: git-svn: fix regex to remove "tail" from svn tags X-Git-Tag: v1.7.3-rc0~82 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/54fb7f9b08270873b0646d84164e1cebe2deb857 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 Acked-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index 34884b8fce..39bcb45593 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -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);