Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337695 - NPE when pressing "checkout" on remote tracking branch
Summary: NPE when pressing "checkout" on remote tracking branch
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 0.11   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.12-M1   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 04:35 EST by Kay Huber CLA
Modified: 2011-02-28 20:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.