Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 306765 - cloning: null pointer ex in GitIndex.java
Summary: cloning: null pointer ex in GitIndex.java
Status: CLOSED DUPLICATE of bug 314853
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 300731
Blocks:
  Show dependency tree
 
Reported: 2010-03-22 16:35 EDT by Andreas Krey CLA
Modified: 2010-07-30 05:28 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Krey CLA 2010-03-22 16:35:53 EDT
(This happens with 0.7.1; yet unavailable in version picker)

When I try to clone an existing repository I get a NullPointerException somewhere late in the process:

java.lang.reflect.InvocationTargetException
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:130)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard$3.run(GitCloneWizard.java:174)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.NullPointerException
at org.eclipse.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:424)
at org.eclipse.jgit.lib.GitIndex.addEntry(GitIndex.java:818)
at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:181)
at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:198)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:135)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:113)
at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:165)
at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:142)
at org.eclipse.egit.core.op.CloneOperation.doCheckout(CloneOperation.java:225)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:121)
... 2 more
Root exception:
java.lang.NullPointerException
at org.eclipse.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:424)
at org.eclipse.jgit.lib.GitIndex.addEntry(GitIndex.java:818)
at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:181)
at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:198)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:135)
at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:113)
at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:165)
at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:142)
at org.eclipse.egit.core.op.CloneOperation.doCheckout(CloneOperation.java:225)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:121)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard$3.run(GitCloneWizard.java:174)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Detail: I try to clone a repo that holds a single project. It is a nonbare repo (the bare ones are out of reach w/o ssh & ProxyCommand). Access is via file:/// url, and the repo has submodules defined. I suspect the latter to be the cause.

(I would not mind if the submodule is simply ignored.)

Session data:

eclipse.buildId=M20090917-0800
java.version=1.5.0_22
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product -keyring /Users/andreaskrey/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.java.product -keyring /Users/andreaskrey/.eclipse_keyring -showlocation
Comment 1 Matthias Sohn CLA 2010-05-26 18:06:06 EDT
JGit currently doesn't work properly with submodules, see bug 300731.
Comment 2 Mathias Kinzler CLA 2010-07-30 05:28:24 EDT

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