summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e91311)
raw | patch | inline | side by side (parent: 3e91311)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 24 May 2005 16:06:51 +0000 (09:06 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 24 May 2005 16:06:51 +0000 (09:06 -0700) |
.. and tell 'co' to shut up about the rcs noise.
This still leaves some branch issues up in the air: it looks like
cvsps has some questionable originating branch information, but I
don't know whether that's a cvsps bug or an actual bug in the
syslinux archive I'm using to test.
I'll let David Mansfield answer my questions about CVS. I'm a
total idiot when it comes to branches under CVS ("I'm pure!").
This still leaves some branch issues up in the air: it looks like
cvsps has some questionable originating branch information, but I
don't know whether that's a cvsps bug or an actual bug in the
syslinux archive I'm using to test.
I'll let David Mansfield answer my questions about CVS. I'm a
total idiot when it comes to branches under CVS ("I'm pure!").
cvs2git.c | patch | blob | history |
diff --git a/cvs2git.c b/cvs2git.c
index c18f904f59bf0e44241ea57e8dac46452fa3194c..2ac53ea828333dfffd7f23dd97688120c2d76255 100644 (file)
--- a/cvs2git.c
+++ b/cvs2git.c
if (!strcmp(src_branch, "HEAD"))
src_branch = "master";
printf("ln -sf refs/heads/'%s' .git/HEAD\n", src_branch);
- printf("git-read-tree -m HEAD\n");
+ printf("git-read-tree -m HEAD || exit 1\n");
printf("git-checkout-cache -f -u -a\n");
}
static void commit(void)
{
const char *cmit_parent = initial_commit ? "" : "-p HEAD";
+ const char *dst_branch;
printf("tree=$(git-write-tree)\n");
printf("cat > .cmitmsg <<EOFMSG\n%s\nEOFMSG\n", log);
printf("commit=$(cat .cmitmsg | git-commit-tree $tree %s)\n", cmit_parent);
- printf("echo $commit > .git/HEAD\n");
+
+ dst_branch = branch;
+ if (!strcmp(dst_branch, "HEAD"))
+ dst_branch = "master";
+
+ printf("echo $commit > .git/refs/heads/'%s'\n", dst_branch);
*date = 0;
*author = 0;
get_rcs_name(rcspathname, name, dir);
- printf("co -p -r%s '%s' > '%s'\n", version, rcspathname, name);
+ printf("co -q -p -r%s '%s' > '%s'\n", version, rcspathname, name);
printf("git-update-cache --add -- '%s'\n", name);
}