Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329495

Summary: Clone fail: missing blob with egit, but not with regular git command line
Product: [Technology] EGit Reporter: Mats Ahlgren <mats_a>
Component: CoreAssignee: Matthias Sohn <matthias.sohn>
Status: CLOSED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: ben.romberg, caniszczyk, christian.halstrick, glyn.normington, robin.rosenberg, sop
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 342892    
Bug Blocks:    

Description Mats Ahlgren CLA 2010-11-04 17:15:39 EDT
Build Identifier: Aptana Studio, build: 2.0.5.1278522500

It is impossible for me to clone a repo with EGit. It works just fine with no errors using regular command-line Git

Dialog appears:
/-------------------------------\
Cloning from ssh://username@server/... 
has encountered a problem

Missing blob 85.....11
                    [OK][Details]

  Missing blob 85.....11
  Missing blob 85.....11
\-------------------------------/

I have been trying to get EGit to work for a few weeks. For the longest time, the .gitignore file included "/build" which was incorrectly matching any subdirectory named "build". I deleted the repository from the package list and tried to clone it again. Then I kept on receiving errors that EGit was "Aborting due to possible repository corruption on the remote side." This was odd because command-line Git was working just fine, and "git fsck --full" was not returning anything odd on the remote repository. "git status" and "git diff HEAD" seemed to show things were up to date.

Suddenly when I did "git gc" I no longer got the bogus corruption error, but now started getting the above dialog saying there is a missing blob. These errors always seem to appear after EGit "counts the objects", about 90% of the way though.

Reproducible: Always

Steps to Reproduce:
1. In EGit view, clone a repository ssh://username@server/...
Comment 1 Chris Aniszczyk CLA 2010-11-04 17:32:15 EDT
What version of EGit/JGit?

Can you reproduce this problem with one of our nightly builds?

http://download.eclipse.org/egit/updates-nightly
Comment 2 Matthias Sohn CLA 2011-02-10 18:09:05 EST
ping ?

Can you share the repository or is this a private one ?
Comment 3 Matthias Sohn CLA 2011-04-14 17:28:41 EDT
Joel reported similar problem on public virgo repository:

cloning
git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.documentation.git 
fails from EGit but succeeds from native git.

Error is

eclipse.buildId=M20100909-0800
java.version=1.6.0_24
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.rcp.product -keyring /Users/d029788/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.rcp.product -keyring /Users/d029788/.eclipse_keyring -showlocation


Error
Thu Apr 14 23:20:25 CEST 2011
Missing unknown 9ada5de967ea8805e7c8142d3647d0500100fa5a

org.eclipse.jgit.api.errors.JGitInternalException: Missing unknown 9ada5de967ea8805e7c8142d3647d0500100fa5a
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:118)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:136)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:261)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:254)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:235)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 9ada5de967ea8805e7c8142d3647d0500100fa5a
	at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:125)
	at org.eclipse.jgit.lib.ObjectDatabase.open(ObjectDatabase.java:176)
	at org.eclipse.jgit.lib.ObjectDatabase.open(ObjectDatabase.java:147)
	at org.eclipse.jgit.lib.Repository.open(Repository.java:243)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:850)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:421)
	at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:216)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:115)
	... 5 more


Joel then tried a dozen other from the Virgo repositories and all but "ide.git" failed.

For more details see [1]

[1] http://www.eclipse.org/forums/index.php?t=msg&goto=665520&S=f050aee4fccbb669db94dddeff83fbd3#msg_665520
Comment 4 Matthias Sohn CLA 2011-04-14 17:32:27 EDT
when cloning this repo using native git and running git show on the unknown SHA-1 I get the following fatal:

[d029788@WDFM00251943A org.eclipse.virgo.documentation (master)]$ git show 9ada5de967ea8805e7c8142d3647d0500100fa5a
fatal: bad object 9ada5de967ea8805e7c8142d3647d0500100fa5a

git fsck doesn't report any problem
Comment 5 Glyn Normington CLA 2011-04-15 04:23:15 EDT
I tried cloning the Virgo documentation repo with egit v0.10.0.201011092121 and it failed with a message saying submodules are not supported. The submodule SHA is 9ada5de967ea8805e7c8142d3647d0500100fa5a, which matches the error in comment 3.

So it seems like the problem is a combination of the lack of support for submodules and an inadequate message in some versions of egit.

Note that all the Virgo repositories except the "ide" repository have a submodule, which explains why that set fails.
Comment 6 Glyn Normington CLA 2011-04-15 04:26:05 EDT
The enhancement request to support submodules is bug 314853.
Comment 7 Robin Rosenberg CLA 2011-09-03 06:14:45 EDT
We can clone repos with submodules, but working with them is another issue.

*** This bug has been marked as a duplicate of bug 343566 ***