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

Bug 359366

Summary: IllegalArgumentException when replacing project with HEAD
Product: [Technology] JGit Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen, robin, ruediger.herrmann
Version: 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Git repository to reproduce the issue none

Description Rüdiger Herrmann CLA 2011-09-29 04:42:32 EDT
I get the exception below when selecting the project in the package explorer and chosing Replace with >  HEAD Revision from the context menu.
I will attach the (small) project in the hope that it makes the error reproducible.

--- Stacktrace ---
java.lang.IllegalArgumentException: FileMode not set for path org.eclipse.jetty.server.enable.dynamic.import/META-INF/MANIFEST.MF
	at org.eclipse.jgit.dircache.DirCacheEditor.applyEdits(DirCacheEditor.java:154)
	at org.eclipse.jgit.dircache.DirCacheEditor.finish(DirCacheEditor.java:122)
	at org.eclipse.jgit.dircache.BaseDirCacheEditor.commit(BaseDirCacheEditor.java:197)
	at org.eclipse.jgit.dircache.DirCacheEditor.commit(DirCacheEditor.java:117)
	at org.eclipse.jgit.api.CheckoutCommand.checkoutPaths(CheckoutCommand.java:272)
	at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:129)
	at org.eclipse.egit.core.op.DiscardChangesOperation.discardChange(DiscardChangesOperation.java:175)
	at org.eclipse.egit.core.op.DiscardChangesOperation.discardChanges(DiscardChangesOperation.java:132)
	at org.eclipse.egit.core.op.DiscardChangesOperation.access$0(DiscardChangesOperation.java:116)
	at org.eclipse.egit.core.op.DiscardChangesOperation$1.run(DiscardChangesOperation.java:109)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.egit.core.op.DiscardChangesOperation.execute(DiscardChangesOperation.java:112)
	at org.eclipse.egit.ui.internal.actions.DiscardChangesActionHandler$1.run(DiscardChangesActionHandler.java:54)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Rüdiger Herrmann CLA 2011-09-29 05:14:57 EDT
Created attachment 204271 [details]
Git repository to reproduce the issue

Select the org.eclipse.jetty.server.dynamic.import project, open the context menu and choose Replace with > HEAD Revision
Comment 2 Kevin Sawicki CLA 2011-11-28 20:50:41 EST
Have you tried 1.2.0 yet and if so do you still see this issue?
Comment 3 Robin Stocker CLA 2014-04-25 17:58:21 EDT
Closing due to no response, looks fixed.