git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] git-svn: fix regex to remove "tail" from svn tags
@ 2010-08-15 13:15 David D. Kilzer
  2010-08-15 23:48 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: David D. Kilzer @ 2010-08-15 13:15 UTC (permalink / raw)
  To: git; +Cc: Eric Wong, David D. Kilzer

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] git-svn: fix regex to remove "tail" from svn tags
  2010-08-15 13:15 [PATCH 1/2] git-svn: fix regex to remove "tail" from svn tags David D. Kilzer
@ 2010-08-15 23:48 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2010-08-15 23:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, David D. Kilzer

"David D. Kilzer" <ddkilzer@kilzer.net> wrote:
> Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>

Thank you David,

I've acked and pushed out both patches to git://git.bogomips.org/git-svn
for Junio

David D. Kilzer (2):
      git-svn: fix regex to remove "tail" from svn tags
      git-svn: fix fetch with deleted tag

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-15 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-15 13:15 [PATCH 1/2] git-svn: fix regex to remove "tail" from svn tags David D. Kilzer
2010-08-15 23:48 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).