summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar David D. Kilzer <ddkilzer@kilzer.net>2010-08-15 06:15:54 -0700
committerLibravatar Eric Wong <normalperson@yhbt.net>2010-08-15 23:43:35 +0000
commit54fb7f9b08270873b0646d84164e1cebe2deb857 (patch)
tree3ca95811c2951da3d014947408bde35309aec522
parentMerge branch 'jc/sha1-name-find-fix' (diff)
downloadtgif-54fb7f9b08270873b0646d84164e1cebe2deb857.tar.xz
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>
-rwxr-xr-xgit-svn.perl2
1 files changed, 1 insertions, 1 deletions
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);