Skip to content

Commit 54fb7f9

Browse files
ddkilzerEric Wong
authored andcommitted
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>
1 parent 3d04589 commit 54fb7f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-svn.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,7 @@ sub other_gs {
29592959
my $gs = Git::SVN->find_by_url($new_url, $url, $branch_from);
29602960
unless ($gs) {
29612961
my $ref_id = $old_ref_id;
2962-
$ref_id =~ s/\@\d+$//;
2962+
$ref_id =~ s/\@\d+-*$//;
29632963
$ref_id .= "\@$r";
29642964
# just grow a tail if we're not unique enough :x
29652965
$ref_id .= '-' while find_ref($ref_id);

0 commit comments

Comments
 (0)