git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Verdoolaege <skimo@liacs.nl>
To: git@vger.kernel.org
Subject: [PATCH] Make cvs2git create tags
Date: Wed, 1 Jun 2005 13:27:23 +0200	[thread overview]
Message-ID: <20050601112723.GA18682@pc117b.liacs.nl> (raw)

The current version of cvs2git doesn't propagate tags.
Trivial patch below.

skimo
-- 
cvs2git: create tags

cvsps seems to put a space after the tag name, so we remove it first.

---
commit 713a66bd98e65237cff37e0dfa68573973a60468
tree 07c5104ebeb6f189dc11eee3263966735307cfac
parent 324a7234776aafdc594942f1e5ef8e0f6358c0a5
author Sven Verdoolaege <skimo@liacs.nl> Wed, 01 Jun 2005 13:15:06 +0200
committer Sven Verdoolaege <skimo@liacs.nl> Wed, 01 Jun 2005 13:15:06 +0200

 cvs2git.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cvs2git.c b/cvs2git.c
--- a/cvs2git.c
+++ b/cvs2git.c
@@ -115,6 +115,7 @@ static void commit(void)
 {
 	const char *cmit_parent = initial_commit ? "" : "-p HEAD";
 	const char *dst_branch;
+	char *space;
 	int i;
 
 	printf("tree=$(git-write-tree)\n");
@@ -147,6 +148,12 @@ static void commit(void)
 
 	printf("echo $commit > .git/refs/heads/'%s'\n", dst_branch);
 
+	space = strchr(tag, ' ');
+	if (space)
+		*space = 0;
+	if (strcmp(tag, "(none)"))
+		printf("echo $commit > .git/refs/tags/'%s'\n", tag);
+
 	printf("echo 'Committed (to %s):' ; cat .cmitmsg; echo\n", dst_branch);
 
 	*date = 0;

             reply	other threads:[~2005-06-01 11:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-01 11:27 Sven Verdoolaege [this message]
2005-06-08  0:43 ` [PATCH] Make cvs2git create tags Petr Baudis

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=20050601112723.GA18682@pc117b.liacs.nl \
    --to=skimo@liacs.nl \
    --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.
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).