From 32798c707e701a7b0b7c19b469a1fcb57bda1f66 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 1 Jun 2005 13:27:23 +0200 Subject: [PATCH] [PATCH] git-cvs2git: create tags cvsps seems to put a space after the tag name, so we remove it first. --- cvs2git.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cvs2git.c b/cvs2git.c index 06dd74b3..97b43005 100644 --- 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; -- 2.11.0