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

Bug 337695

Summary: NPE when pressing "checkout" on remote tracking branch
Product: [Technology] JGit Reporter: Kay Huber <quorg.xtn>
Component: JGitAssignee: Matthias Sohn <matthias.sohn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, stefan.lay
Version: 0.11   
Target Milestone: 0.12-M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Kay Huber CLA 2011-02-21 04:35:29 EST
Steps to reproduce:

* Have a "bare" repo ready with some content
* Create an empty local repo
* "Create Remote" on local repo, only select fetch configuration, specify the bare repo as source
* Fetch bare repo content into local repo
* In the local repo, on the Remote Tracking branch, press "checkout"

java.lang.NullPointerException
	at org.eclipse.jgit.lib.ObjectIdSubclassMap.index(ObjectIdSubclassMap.java:213)
	at org.eclipse.jgit.lib.ObjectIdSubclassMap.get(ObjectIdSubclassMap.java:89)
	at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:809)
	at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:724)
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:124)
	at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
	at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:125)
	at org.eclipse.egit.ui.internal.branch.BranchOperationUI$1.run(BranchOperationUI.java:106)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Matthias Sohn CLA 2011-02-28 19:03:23 EST
code review for proposed fix: http://egit.eclipse.org/r/#change,2614
Comment 2 Matthias Sohn CLA 2011-02-28 19:04:43 EST
this is a bug in jgit CheckoutCommand
Comment 3 Chris Aniszczyk CLA 2011-02-28 20:17:33 EST
Fixed in master.