Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@liacs.nl>2005-06-01 15:27:23 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 19:17:29 +0400
commit32798c707e701a7b0b7c19b469a1fcb57bda1f66 (patch)
treefaeb4ad2f8ed9f114e194f3ed016db4efa727b88 /cvs2git.c
parentaf3f929f9546268ede788b4217ff0b6a655ab62a (diff)
[PATCH] git-cvs2git: create tags
cvsps seems to put a space after the tag name, so we remove it first.
Diffstat (limited to 'cvs2git.c')
-rw-r--r--cvs2git.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cvs2git.c b/cvs2git.c
index 06dd74b368..97b4300519 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;