Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359366 - IllegalArgumentException when replacing project with HEAD
Summary: IllegalArgumentException when replacing project with HEAD
Status: CLOSED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 1.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 04:42 EDT by Rüdiger Herrmann CLA
Modified: 2014-04-25 17:58 EDT (History)
3 users (show)

See Also:


Attachments
Git repository to reproduce the issue (67.49 KB, application/octet-stream)
2011-09-29 05:14 EDT, Rüdiger Herrmann CLA
no flags Details

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