git-svn重新设置“文件名太长" [英] git-svn rebase "File name too long"
问题描述
我在跑步
$ git svn rebase
几分钟后,它已完成获取并开始变基. 而且我收到了下一条错误消息:
After couple of minutes it's finished fetching and started rebasing. And I have got next error message:
First, rewinding head to replay your work on top of it...
error: cannot stat '$73_chars_4_deep_levels_path_with_spaces/$180_chars_file_name_looks_cutted_with_spaces_too': File name too long
error: cannot stat '$73_chars_4_deep_levels_path_with_spaces/$180_chars_file_name_looks_cutted_with_spaces_too': File name too long
error: cannot stat '$73_chars_4_deep_levels_path_with_spaces/$180_chars_file_name_looks_cutted_with_spaces_too': File name too long
could not detach HEAD
rebase refs/remotes/git-svn: command returned error: 1
我阅读了以下问题 " git checkout-index:无法创建文件(文件名太长)"
I read the following question "git checkout-index: unable to create file (File name too long)"
它与我关系密切,但不能解决我的问题.
It is closely relative to me, but doesn't solving my problem.
否
git ls-files --stage
也
git ls-files
未找到问题"$ 180_chars_file_name_looks_cutted_with_spaces_too"文件. 同样,我无法按照bdonlan在他的解决方案中所说的那样(通过某种政治决策)重命名文件.
doesn't found problem "$180_chars_file_name_looks_cutted_with_spaces_too" file. Also I can't rename files (by some kind of politic decisions) as said by bdonlan in his solution.
除了将每个文件夹下载到单独的SVN存储库并通过嫁接进行合并之外,是否有其他解决方法或解决方案?
Is there are any workarounds or solutions except download each folder to separate SVN-repo and merge through grafts?
更新
我已经尝试过以上所有方法
I have tried all of above at
MacOsX 10.6
git version 1.7.9.6
svn, version 1.7.4 (r1295709)
提交者正在使用NTFS在Windows中完成工作
And commiters are doing they job from Windows with NTFS
更新2
我做了一些研究. 我认为问题出在UTF-8字符上. 我尝试创建新文件
I did some research. I think the problem lies in UTF-8 chars. I've tried to create new file
$ touch "$180_chars_file_name_looks_cutted_with_spaces_too"
$ ls
132_chars_file_name_with_numbers_at_the_end
文件看起来已损坏.它的末尾有一些数字.您可以复制它,例如:
File looks corrupted. It has some numbers at the end. You may reproduce it, for example:
$ touch "яяяяяяяяя яя яяяя яя яяяяяяяяяя яяяяяяяяя я яяяяяя я яяя яяяяяяяяя яяяяяяяяяяяяя яяяяяяяя я яяяяяяяяяяяяяяяяяя яяяяяя яя яяяяяя яяяяяяяяяяяяя яяяяяяяя яяяяя яяяяяя я яяя яяяяя яяя"
$ ls
яяяяяяяяя яя яяяя яя яяяяяяяяяя яяяяяяяяя я яяяяяя я яяя яяяяяяяяя яяяяяяяяяяяяя яяяяяяяя я яяяяяяяяяяяяяяяяяя яяяяяя яя яяяяяя яяяя#464CDD8
通过vim编辑器成功打开并编辑了"132_chars_file_name_with_numbers_at_the_end". 但是当我输入:wq"文件时消失了.
When successfully opened "132_chars_file_name_with_numbers_at_the_end" by vim editor and edited it. But when I entered ":wq" file disappeared.
现在,我想我找到了问题的根源,但是之后生活并没有变得更轻松)
Now I think I found the root of my problem, but life doesn't going easier after that )
推荐答案
最后,在我的情况下,我找到了一个尽可能优雅的解决方案. 我已经通过MacOs Disk Utility创建了ExFat dmg-image. 之后,我挂载了新的图像文件并将git-repo复制到其中. 在VirtualBox下,它比Cygwin更好.
Finally, I found as elegant solution as possible in my situation. I have created ExFat dmg-image by MacOs Disk utility. After that I mounted new image-file and copied my git-repo into it. It works more better than Cygwin under VirtualBox.
此外,我尝试使用NTFS,但失败了. NTFS-3G或Tuxero驱动程序也不支持长的UTF名称. Linux和ReiserFS的情况与此相同.
Also, I've tried to use NTFS, but I have taken fiasco. Nor NTFS-3G, nor Tuxero driver doesn't support long UTF-names. The same story with Linux and ReiserFS.
这篇关于git-svn重新设置“文件名太长"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!