diff options
author | Sven Verdoolaege <skimo@liacs.nl> | 2005-06-01 13:27:23 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-08 08:17:29 -0700 |
commit | 32798c707e701a7b0b7c19b469a1fcb57bda1f66 (patch) | |
tree | faeb4ad2f8ed9f114e194f3ed016db4efa727b88 | |
parent | af3f929f9546268ede788b4217ff0b6a655ab62a (diff) | |
download | git-32798c707e701a7b0b7c19b469a1fcb57bda1f66.tar.gz |
[PATCH] git-cvs2git: create tags
cvsps seems to put a space after the tag name, so we remove it first.
-rw-r--r-- | cvs2git.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |