为什么当存在子模块时,`git mv`coredump?
我有一个名为为什么当存在子模块时,`git mv`coredump?,git,Git,我有一个名为third\u party的目录,我想将其重命名为thirdParty。第三方的子目录中有我的git子模块,这可能是相关的。但是,当我尝试重命名目录时,出现以下错误: $ git mv third_party/ thirdParty git: builtin/mv.c:259: cmd_mv: Assertion `pos >= 0' failed. Aborted (core dumped) 现在git status显示我已经删除了第三方,并且第三方存在并拥有所需的数据。好
third\u party
的目录,我想将其重命名为thirdParty
。第三方
的子目录中有我的git子模块
,这可能是相关的。但是,当我尝试重命名目录时,出现以下错误:
$ git mv third_party/ thirdParty
git: builtin/mv.c:259: cmd_mv: Assertion `pos >= 0' failed.
Aborted (core dumped)
现在git status
显示我已经删除了第三方
,并且第三方
存在并拥有所需的数据。好的,那么谁在乎它是否转储了内核呢,我将重新启动git,然后再试一次
$ git add thirdParty/
fatal: Unable to create 'basedir/.git/index.lock': File exists.
好的,只需删除锁并继续:
$ git add thirdParty/
$ git status
fatal: Could not chdir to '../../../../third_party/OpenBLAS': No such file or directory
fatal: 'git status --porcelain' failed in submodule thirdParty/OpenBLAS
(OpenBLAS是我的git子模块之一。)
我怎样才能避开这个问题
git版本1.9.1
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
$ cat .gitmodules
[submodule "third_party/OpenBLAS"]
path = third_party/OpenBLAS
url = https://github.com/xianyi/OpenBLAS.git
ignore = dirty
[submodule "third_party/boost"]
path = third_party/boost
url = https://github.com/boostorg/boost.git
ignore = dirty
[submodule "third_party/open-mpi"]
path = third_party/open-mpi
url = https://github.com/open-mpi/ompi-release.git
ignore = dirty
如果断言失败,那就是代码中的错误。寄邮件到git@vger.kernel.org基本上就是您在这里报告的内容。当移动1.9.1之后进入的git子模块时,有一个越界数组访问的修复程序。您可以尝试使用2.0.0或更高版本,看看是否可以解决问题。