git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Smith <msmith@cbnco.com>
To: git@vger.kernel.org
Subject: [RFC] svnimport/cvsimport: force creation of tags that already exist.
Date: Fri, 7 Sep 2007 11:42:22 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0709071125090.6203@juice.ott.cti.com> (raw)

Hi all,

git-svnimport was changed recently to use git-tag to make tags (47ee8ed2). 
I've had to add the "-f" option to import a repository where a tag was 
moved. I think git-cvsimport would have the same problem.

I understand moving tags is frowned upon in Git. I don't know how common 
the practise is in Subversion and CVS, or whether it makes sense to 
make the import scripts force tag creation by default.

Mike

---
 git-cvsimport.perl |    2 +-
 git-svnimport.perl |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index ba23eb8..2954fb8 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -779,7 +779,7 @@ sub commit {
 		$xtag =~ tr/_/\./ if ( $opt_u );
 		$xtag =~ s/[\/]/$opt_s/g;
 
-		system('git-tag', $xtag, $cid) == 0
+		system('git-tag', '-f', $xtag, $cid) == 0
 			or die "Cannot create tag $xtag: $!\n";
 
 		print "Created tag '$xtag' on '$branch'\n" if $opt_v;
diff --git a/git-svnimport.perl b/git-svnimport.perl
index 8c17fb5..d3ad5b9 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -873,7 +873,7 @@ sub commit {
 
 		$dest =~ tr/_/\./ if $opt_u;
 
-		system('git-tag', $dest, $cid) == 0
+		system('git-tag', '-f', $dest, $cid) == 0
 			or die "Cannot create tag $dest: $!\n";
 
 		print "Created tag '$dest' on '$branch'\n" if $opt_v;
-- 
1.5.2.1

             reply	other threads:[~2007-09-07 16:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 15:42 Michael Smith [this message]
2007-09-07 20:54 ` [RFC] svnimport/cvsimport: force creation of tags that already exist Junio C Hamano
2007-09-07 21:35   ` [PATCH] (cvs|svn)import: Ask git-tag to overwrite old tags Michael Smith

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0709071125090.6203@juice.ott.cti.com \
    --to=msmith@cbnco.com \
    --cc=git@vger.kernel.org \
    /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.
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).