From deb153a75ae1f5eca628a38b911474a69edd242d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 19 Jun 2005 00:31:15 +0200 Subject: [PATCH] [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 Signed-off-by: Linus Torvalds --- cvs2git.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cvs2git.c b/cvs2git.c index 97b4300519..d438475d03 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); }