From: "David D. Kilzer" <ddkilzer@kilzer.net>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>,
"David D. Kilzer" <ddkilzer@kilzer.net>
Subject: [PATCH 1/2] git-svn: fix regex to remove "tail" from svn tags
Date: Sun, 15 Aug 2010 06:15:54 -0700 [thread overview]
Message-ID: <1281878155-61937-1-git-send-email-ddkilzer@kilzer.net> (raw)
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>
---
git-svn.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 34884b8..39bcb45 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);
--
1.7.2.1.49.g98551
next reply other threads:[~2010-08-15 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-15 13:15 David D. Kilzer [this message]
2010-08-15 23:48 ` [PATCH 1/2] git-svn: fix regex to remove "tail" from svn tags Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281878155-61937-1-git-send-email-ddkilzer@kilzer.net \
--to=ddkilzer@kilzer.net \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).