# [PATCH] Make cvs2git create tags

2 messages from 2005-06-01 to 2005-06-08. Participants: Sven Verdoolaege, Petr Baudis.
Thread: https://gitlist.dev/t/793

## Sven Verdoolaege, 2005-06-01 11:27

Subject: [PATCH] Make cvs2git create tags
Message-ID: <20050601112723.GA18682@pc117b.liacs.nl>
URL: https://gitlist.dev/e/20050601112723.GA18682%40pc117b.liacs.nl

```
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;

```

## Petr Baudis, 2005-06-08 00:43

Subject: Re: [PATCH] Make cvs2git create tags
Message-ID: <20050608004316.GA7916@pasky.ji.cz>
URL: https://gitlist.dev/e/20050608004316.GA7916%40pasky.ji.cz
In-Reply-To: <20050601112723.GA18682@pc117b.liacs.nl>

```
Dear diary, on Wed, Jun 01, 2005 at 01:27:23PM CEST, I got a letter
where Sven Verdoolaege <skimo@liacs.nl> told me that...
> 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.

  Hi,

  this seems to have been forgotten along the way, and still appears to
be applicable to the latest git.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

```
