@matheusbsbs / matheus-bagliano / commits / 54fb7f9b08
Fork 0

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>

David D. Kilzer committed Aug 15, 2010 at 06:15 UTC 54fb7f9b08270873b0646d84164e1cebe2deb857
1 file changed +1 -1
git-svn.perl
+1 -1
@@ -2959,7 +2959,7 @@ sub other_gs {
2959 my $gs = Git::SVN->find_by_url($new_url, $url, $branch_from);
2960 unless ($gs) {
2961 my $ref_id = $old_ref_id;
2962 - $ref_id =~ s/\@\d+$//;
2962 + $ref_id =~ s/\@\d+-*$//;
2963 $ref_id .= "\@$r";
2964 # just grow a tail if we're not unique enough :x
2965 $ref_id .= '-' while find_ref($ref_id);