Git会产生“错误:存在未合并的索引条目". [英] Git produces "BUG: There are unmerged index entries"

查看:786
本文介绍了Git会产生“错误:存在未合并的索引条目".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这样做时:

git merge some-branch

我知道

BUG: There are unmerged index entries:
BUG: 3 docfatal: Bug in merge-recursive.c

不知道这意味着什么,但是看起来比通常情况更令人意外.我应该怎么办?有一些清理命令可以帮助我吗?

Not sure what this means, but it looks like something more unexpected then usually. What am I supposed to do with this? Is there some clean up command that could help me here?

编辑

更糟糕的是,此错误实际上在我的源代码之一中传播.由于some-branch最初只是我的本地工作,因此将其推送到远程服务器上.然后克隆一个新的存储库,并尝试将上述分支合并到此副本上,并得到相同的消息.

What is worse, this bug actually spreads along one of the versions of my source. As some-branch was originally just my local work, I pushed it onto the remote server. Then cloned a fresh repository and tried to merge the aforementioned branch on this copy and got the same message.

编辑2

我使用了GIT_MERGE_VERBOSITY = 5并得到了:

I used GIT_MERGE_VERBOSITY=5 and got:

$> export GIT_MERGE_VERBOSITY=5; git merge origin/funkload 
Merging:
a1ef5a2 Uaktualniony INSTALL.
virtual origin/funkload
found 2 common ancestor(s):
d2eb442 Resources py.
119871b Nowy commit w doc.
  Merging:
  d2eb442 Resources py.
  119871b Nowy commit w doc.
  found 1 common ancestor(s):
  62f4183 Poprawiony bug w obsłudze linków do resources, które są null.
  Removing doc/concept/agreement.lyx
  Removing doc/concept/agreement.pdf
  Removing doc/concept/concept.lyx
  ...
  Removing druglo-doc
  Removing src/db/fixtures/initial.json
  Skipped src/druglo/backend/actions/tests/fight.py (merged same as existing)
  Auto-merging src/druglo/backend/characters/models/behaviours.py
  CONFLICT (content): Merge conflict in src/druglo/backend/characters/models/behaviours.py
  Auto-merging src/druglo/backend/players/models/players.py
  Auto-merging src/druglo/backend/worlds/resources.py
  CONFLICT (content): Merge conflict in src/druglo/backend/worlds/resources.py
  Auto-merging src/druglo/common/integrity/webservices/resources.py
  CONFLICT (content): Merge conflict in src/druglo/common/integrity/webservices/resources.py
  Removing src/druglo/frontend/cityscreen/models.py
  Removing src/druglo/frontend/forms.py
  Removing src/druglo/frontend/mainscreen/models.py
  Removing src/druglo/frontend/models.py
  CONFLICT (directory/file): There is a directory with name doc in Temporary merge branch 1. Adding doc as doc~Temporary merge branch 2
BUG: There are unmerged index entries:
BUG: 3 docfatal: Bug in merge-recursive.c

注意:我最近将目录之一移到了单独的子模块中.因此,我遇到了很多冲突.看来该错误与此有关.

Note: I've recently moved one of my directories into a separate submodule. Now I get a lot of conflicts because of that. It seems the bug is related to that.

推荐答案

该错误消息是

That error message was introduced in January 2010, and to help debug this case, Junio C. Hamano recommends settings GIT_MERGE_VERBOSITY to 5:

我们可能希望建议用户将GIT_MERGE_VERBOSITY设置为5,然后重新运行消息中的合并.
至少我们会知道process_renames()process_entry()函数的哪一部分不能正确处理未合并的路径,这可能有助于我们诊断问题.

We might want to suggest the user to set GIT_MERGE_VERBOSITY to 5 and re-run the merge in the message.
At least we will know which part of process_renames() or process_entry() functions is not correctly handling the unmerged paths, and it might help us diagnosing the issue.

OP julkiewicz 报告

CONFLICT (directory/file): 
There is a directory with name doc in Temporary merge branch 1. 
Adding doc as doc~Temporary merge branch 2

允许隔离导致此错误消息的目录.

which allowed for isolating the directory causing this error message.

这篇关于Git会产生“错误:存在未合并的索引条目".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆