Egit in eclipse missing tree

后端 未结 1 1849
北恋
北恋 2020-11-21 06:46

Looks like I have a missing tree error. Just to be fair, I did totally just mess up my local files on git and got fed up and did a complete hard disk delete on my repo and r

1条回答
  •  别那么骄傲
    2020-11-21 06:54

    160000 is a special entry for recording a submodule.
    A SHA1 equals to 40 zeros means the submodule has been deleted (see git-submodule.sh) or in an unknown state:

    When you compare something with a work tree state, and when the work tree state is dirty, we always show 0{40} to mean "it is dirty and we do not know what the object name of that thing is, until you actuallly run git-update-index (or git-add) it" (and at that point it would stop being dirty).
    For blobs (be it a regular file or a symbolic link), this has an advantage of not having to run hash-object to obtain the object name of an object that would be created if you actually did git-add it.

    When we check if it is dirty, we already do an lstat(2) and know the type of it, so we can show the mode bits. So you will see 100644, 100755 or 120000 for blobs. Similarly for a submodule.

    For a submodule, we could read the value from $sub/.git/HEAD, but it is more consistent to show 0{40} on the work tree side (typically the right hand side, unless you use -R).

    So check if you have a .git/modules/asubmodule/HEAD.
    Or try to cleanup your submodule entry, and then redeclare that submodule to eagle-vision url.

    But your missing tree might not be related to that entry though.

    0 讨论(0)
提交回复
热议问题