我正在尝试将我的 CVS 存储库转换为 GIT,但遇到了奇怪的问题:
git fast-import
硬编码文件模式为 100755 和 100644,否则它会死掉。
来源:
p = get_mode(p, &mode);
if (!p)
die("Corrupt mode: %s", command_buf.buf);
switch (mode) {
case 0644:
case 0755:
mode |= S_IFREG;
case S_IFREG | 0644:
case S_IFREG | 0755:
case S_IFLNK:
case S_IFDIR:
case S_IFGITLINK:
/* ok */
break;
default:
die("Corrupt mode: %s", command_buf.buf);
}
// https://github.com/git/git/blob/master/fast-import.c 2272-2288
有人可以解释一下这种解决方案的原因吗?