egit在日食失踪树 [英] Egit in eclipse missing tree

查看:239
本文介绍了egit在日食失踪树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来我有一个缺失的树错误。只是为了公平起见,我完全搞砸了我的本地文件git,并厌倦了,并完成了硬盘删除在我的回购并从远程主机重新抛出。现在我收到以下错误。我做的第一件事是为我的工作创建一个本地分支。



如果我没有删除所有内容,我可以恢复很多工作但嘿,通过时间 - 对吗? (这可能会显示我的心态,现在用git和我的项目也是...)



如果有任何区别,我正在做一个android项目。 p>

我正在阅读这个帖子,似乎有帮助,但我不知道如何找到我的a30df1173f14dea24df661f1eef749fed2f4e1edsha1哈希。



执行


git ls-tree a30df1173f14dea24df661f1eef749fed2f4e1ed


给我以下

  100755团块2851ba4fdf2a134f8fc97fd60b3045b73cd6039b .DS_Store 
100755团块3f9691c5dda29b09cb96060fd6ec7017f6c671d2的.classpath
100755团块c50d3b4fe2f6221db617840561dc94d7690bb883的.gitignore
100755团块6b58f1723a252cfd314d108fadac4b71a4209c1c的.project
100755团块39f00018845d776de324707090d26c5153720e22 AndroidManifest .xml
100755 blob 94a9ed024d3859793618152ea559a168bb cbb5e2复印
100755个一滴c1853e4c312a938d5890f5f4e0844782429ba11e default.properties
040000树423accda532f8788f916b26b863ddf32e2896aa6文档
160000犯0000000000000000000000000000000000000000鹰眼
100755一滴424f2604203eabd2310165b143b430326aa87ee7 ic_launcher-web.png
040000树2b83cd828cd11a11e84a2d8f646dfa40de109827库
100644一滴8a7b1fac8f8c12e925e56776f225730c4712f92a lint.xml
040000树c0182f719fccf5fc8b0d7658c3d15fe4deac0d9e插件
100755一滴f2fe1559a217865a5454add526dcc446f892385b proguard的-project.txt
100755一滴9ae01de96458dbded45d2a442c09c0f4d33e473a project.properties
040000树3c9446b3bb23eebe80942992ee03e01a7390ba80资源
040000 tree 895e957ccc4ee642127c25a3481d784302e44a70 src

在所有这些中,老鹰的视觉似乎与所有这些0的怪异: / p>


160000提交0000000000000000000000000000 000000000000鹰视野


不知道我要去哪里。试图通过git faq不会太远。



这是整个错误:

  eclipse.buildId = v22.0.0-675183 
java.version = 1.7.0_21
java.vendor = Oracle Corporation
BootLoader常量:OS = linux,ARCH = x86_64,WS = gtk,NL = en_US
框架参数:-product com.android.ide.eclipse.adt.package.product
命令行参数:-os linux -ws gtk -arch x86_64 -product com.android.ide.eclipse.adt.package.product

错误
Sun Oct 13 21:11:59 CDT 2013
缺少树2ec4e5b3e0e3d9ccc766fd1ed0dccaedcef3e53a

org.eclipse.jgit.errors.MissingObjectException:缺少树2e4e5b3e0e3d9ccc766fd1ed0dccaedcef3e53a
在org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:127)
在org.eclipse。 jgit.treewalk.CanonicalTreeParser.reset(CanonicalTreeParser.java:201)
在org.eclipse.jgit.treewalk.TreeWalk.parserFor(TreeWalk.java:984)
在org.eclipse.jgit.treewalk。树Walk.addTree(TreeWalk.java:468)
在org.eclipse.egit.core.synchronize.GitSyncCache.loadDataFromGit(GitSyncCache.java:130)
在org.eclipse.egit.core.synchronize。 GitSyncCache.getAllData(GitSyncCache.java:85)
在org.eclipse.egit.core.synchronize.GitSyncCache.getAllData(GitSyncCache.java:63)
在org.eclipse.egit.core.synchronize。 GitResourceVariantTreeSubscriber.refresh(GitResourceVariantTreeSubscriber.java:180)
在org.eclipse.team.core.subscribers.Subscriber.refresh(Subscriber.java:466)
在org.eclipse.egit.core.synchronize。 (gitSubscriberMergeContext.java:132)$ b .GitSubscriberMergeContext $ 1.indexDiffChanged(GitSubscriberMergeContext.java:68)
在org.eclipse.egit.core.internal.indexdiff.IndexDiffCache.notifyListeners(IndexDiffCac he.java:98)
在org.eclipse.egit.core.internal.indexdiff.IndexDiffCache.access $ 0(IndexDiffCache.java:89)
在org.eclipse.egit.core.internal.indexdiff .IndexDiffCache $ index.indexDiffChanged core.internal.indexdiff.IndexDiffCacheEntry.access $ 8(IndexDiffCacheEntry.java:417)
在org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry $ 5.run(IndexDiffCacheEntry.java:358)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)


解决方案

160000 特殊条目用于录制子模块。

SHA1等于40个零表示子模块已被删除(请参阅 git-submodule.sh )或者未知状态


当您与工作树进行比较时状态,当工作树状态变脏时,我们总是显示 0 {40} 表示它是脏的,我们不知道该对象的名称是,直到你实际运行git-update-index(或git-add)它(并且在那时它会停止变脏)。

对于blob(无论是常规文件还是符号链接) ,这样做的优点是不用运行hash-object来获取如果你真的做了git-add就可以创建的对象的对象名。



我们检查它是否脏了,我们已经做了一个lstat(2)并且知道它的类型
,所以我们可以显示模式位。所以你会看到100644,100755或
120000为斑点。对于子模块,对于子模块,我们可以读取$ sub / .git / HEAD中的值,但是更一致的是显示0 {40} on工作树边(通常是右手边,除非你使用-R)。


所以检查你是否有一个 .git / modules / asubmodule / HEAD

或尝试清理您的子模块条目,然后将该子模块重新声明为eagle-vision url。



但是,您丢失的树可能与该条目无关。 >

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 recloned from remote master. Now I'm getting the following error. One of the first things I did was create a local branch for my work.

Chances are I could've recovered a lot of my work if I didn't delete everything but hey, pass tense - right? (This may show my state of my mind right now with git and my project too...)

If it makes any difference I am making an android project.

I'm reading this post and it seems helpful but I have no idea how to find my "a30df1173f14dea24df661f1eef749fed2f4e1ed" sha1 hash.

Doing

git ls-tree a30df1173f14dea24df661f1eef749fed2f4e1ed

Gives me the following

100755 blob 2851ba4fdf2a134f8fc97fd60b3045b73cd6039b    .DS_Store
100755 blob 3f9691c5dda29b09cb96060fd6ec7017f6c671d2    .classpath
100755 blob c50d3b4fe2f6221db617840561dc94d7690bb883    .gitignore
100755 blob 6b58f1723a252cfd314d108fadac4b71a4209c1c    .project
100755 blob 39f00018845d776de324707090d26c5153720e22    AndroidManifest.xml
100755 blob 94a9ed024d3859793618152ea559a168bbcbb5e2    COPYING
100755 blob c1853e4c312a938d5890f5f4e0844782429ba11e    default.properties
040000 tree 423accda532f8788f916b26b863ddf32e2896aa6    docs
160000 commit 0000000000000000000000000000000000000000  eagle vision
100755 blob 424f2604203eabd2310165b143b430326aa87ee7    ic_launcher-web.png
040000 tree 2b83cd828cd11a11e84a2d8f646dfa40de109827    libs
100644 blob 8a7b1fac8f8c12e925e56776f225730c4712f92a    lint.xml
040000 tree c0182f719fccf5fc8b0d7658c3d15fe4deac0d9e    plugins
100755 blob f2fe1559a217865a5454add526dcc446f892385b    proguard-project.txt
100755 blob 9ae01de96458dbded45d2a442c09c0f4d33e473a    project.properties
040000 tree 3c9446b3bb23eebe80942992ee03e01a7390ba80    res
040000 tree 895e957ccc4ee642127c25a3481d784302e44a70    src

Out of all of them the eagle vision seems weird with all those 0's:

160000 commit 0000000000000000000000000000000000000000 eagle vision

Not really sure where I'm going with this though. Trying to go through the git faq doesn't go very far.

Here's the whole error:

eclipse.buildId=v22.0.0-675183
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product com.android.ide.eclipse.adt.package.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product com.android.ide.eclipse.adt.package.product

Error
Sun Oct 13 21:11:59 CDT 2013
Missing tree 2ec4e5b3e0e3d9ccc766fd1ed0dccaedcef3e53a

org.eclipse.jgit.errors.MissingObjectException: Missing tree 2ec4e5b3e0e3d9ccc766fd1ed0dccaedcef3e53a
    at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:127)
    at org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(CanonicalTreeParser.java:201)
    at org.eclipse.jgit.treewalk.TreeWalk.parserFor(TreeWalk.java:984)
    at org.eclipse.jgit.treewalk.TreeWalk.addTree(TreeWalk.java:468)
    at org.eclipse.egit.core.synchronize.GitSyncCache.loadDataFromGit(GitSyncCache.java:130)
    at org.eclipse.egit.core.synchronize.GitSyncCache.getAllData(GitSyncCache.java:85)
    at org.eclipse.egit.core.synchronize.GitSyncCache.getAllData(GitSyncCache.java:63)
    at org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber.refresh(GitResourceVariantTreeSubscriber.java:180)
    at org.eclipse.team.core.subscribers.Subscriber.refresh(Subscriber.java:466)
    at org.eclipse.egit.core.synchronize.GitSubscriberMergeContext.handleRepositoryChange(GitSubscriberMergeContext.java:142)
    at org.eclipse.egit.core.synchronize.GitSubscriberMergeContext.access$0(GitSubscriberMergeContext.java:133)
    at org.eclipse.egit.core.synchronize.GitSubscriberMergeContext$1.indexDiffChanged(GitSubscriberMergeContext.java:68)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCache.notifyListeners(IndexDiffCache.java:98)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCache.access$0(IndexDiffCache.java:89)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCache$1.indexDiffChanged(IndexDiffCache.java:84)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.notifyListeners(IndexDiffCacheEntry.java:425)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.access$8(IndexDiffCacheEntry.java:417)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry$5.run(IndexDiffCacheEntry.java:358)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

解决方案

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.

这篇关于egit在日食失踪树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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