Browse Source

[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>
maint
Sven Verdoolaege 20 years ago committed by Linus Torvalds
parent
commit
deb153a75a
  1. 5
      cvs2git.c

5
cvs2git.c

@ -193,7 +193,10 @@ static void update_file(char *line) @@ -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);
}


Loading…
Cancel
Save