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

Bug 333979

Summary: Replace with -> File in git index on untracked file causes NPE
Product: [Technology] EGit Reporter: Jens Baumgart <jens.baumgart>
Component: UIAssignee: Jens Baumgart <jens.baumgart>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mathias.kinzler
Version: 0.11   
Target Milestone: 0.11-M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jens Baumgart CLA 2011-01-11 09:43:22 EST
Executing Action "Replace with -> File in git index" on an untracked file causes an NPE.

An internal error occurred during: "Discard Changes".

java.lang.NullPointerException
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:808)
	at org.eclipse.egit.core.op.DiscardChangesOperation.discardChange(DiscardChangesOperation.java:162)
	at org.eclipse.egit.core.op.DiscardChangesOperation.discardChanges(DiscardChangesOperation.java:117)
	at org.eclipse.egit.core.op.DiscardChangesOperation.access$0(DiscardChangesOperation.java:101)
	at org.eclipse.egit.core.op.DiscardChangesOperation$1.run(DiscardChangesOperation.java:94)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.egit.core.op.DiscardChangesOperation.execute(DiscardChangesOperation.java:97)
	at org.eclipse.egit.ui.internal.actions.DiscardChangesActionHandler$1.run(DiscardChangesActionHandler.java:46)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Jens Baumgart CLA 2011-01-11 10:15:38 EST
Fix proposed: http://egit.eclipse.org/r/2233
Comment 2 Mathias Kinzler CLA 2011-01-13 09:51:25 EST
Merged as e48741275f61ab2e85dc17b3689a7e7e72f994da