From 54fb7f9b08270873b0646d84164e1cebe2deb857 Mon Sep 17 00:00:00 2001 From: "David D. Kilzer" Date: Sun, 15 Aug 2010 06:15:54 -0700 Subject: 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 --- git-svn.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1