[updated PATCH] Protect current tags, import tags into remote tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



git-cvsimport properly creates a subdir in refs/remotes to put the
branches in from the remote repository, it currently stores any tags
directly in refs/tags, which makes the imported tags overwrite current
ones.  This patch makes sure that imported tags are under the proper
refs/remotes/.../tags subdirectory as well.

Signed-off-by: Stephen R. van den Berg <srb@xxxxxxx>
---

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


diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 95c5eec..73109d6 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -781,7 +781,7 @@ sub commit {
 		$xtag =~ tr/_/\./ if ( $opt_u );
 		$xtag =~ s/[\/]/$opt_s/g;
 
-		system('git-tag', '-f', $xtag, $cid) == 0
+		system("git-update-ref $remote/tags/$xtag $cid") == 0
 			or die "Cannot create tag $xtag: $!\n";
 
 		print "Created tag '$xtag' on '$branch'\n" if $opt_v;


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux