summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <Sven.Verdoolaege@cs.kuleuven.ac.be>2005-06-18 22:31:15 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-18 22:38:23 (GMT)
commitdeb153a75ae1f5eca628a38b911474a69edd242d (patch)
tree95fb2d4ba95e53ec42f3489d4838dd3a482c4637
parent28342a5d328fa11829dbe883837e21e08dd83388 (diff)
downloadgit-deb153a75ae1f5eca628a38b911474a69edd242d.zip
git-deb153a75ae1f5eca628a38b911474a69edd242d.tar.gz
git-deb153a75ae1f5eca628a38b911474a69edd242d.tar.bz2
[PATCH] cvs2git and file permissions
git-cvs2git: propagate mode information Let cvs checkout in a temporary directory rather than using the pipe option to avoid loss of mode information. Signed-off-by: Sven Verdoolaege <skimo@liacs.nl> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--cvs2git.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cvs2git.c b/cvs2git.c
index 97b4300..d438475 100644
--- a/cvs2git.c
+++ b/cvs2git.c
@@ -193,7 +193,10 @@ static void update_file(char *line)
if (dir)
printf("mkdir -p %.*s\n", (int)(dir - name), name);
- printf("cvs -q -d %s checkout -r%s -p '%s/%s' > '%s'\n", cvsroot, version, cvsmodule, name, name);
+ printf("cvs -q -d %s checkout -d .git-tmp -r%s '%s/%s'\n",
+ cvsroot, version, cvsmodule, name);
+ printf("mv -f .git-tmp/%s %s\n", dir ? dir+1 : name, name);
+ printf("rm -rf .git-tmp\n");
printf("git-update-cache --add -- '%s'\n", name);
}