From: Sven Verdoolaege Date: Sat, 18 Jun 2005 22:31:15 +0000 (+0200) Subject: [PATCH] cvs2git and file permissions X-Git-Tag: v0.99~253 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=deb153a75ae1f5eca628a38b911474a69edd242d;p=git.git [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 --- diff --git a/cvs2git.c b/cvs2git.c index 97b43005..d438475d 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); }