Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347571 - Reset hard does not clear index entries if the resource has been deleted
Summary: Reset hard does not clear index entries if the resource has been deleted
Status: CLOSED INVALID
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-29 05:25 EDT by Robin Rosenberg CLA
Modified: 2011-05-29 05:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Rosenberg CLA 2011-05-29 05:25:30 EDT
This could also be JGit, if EGit is acgually doing the right thing, which
I believe it is not. It cannot just checkout the index, since the index itlse
must also be reset with the "hard" option.

Add a new resource
Add it to the git repo
Remove the added resource from the file system (outside of eclipse)
Use Team>Reset with the Hard option
Expect: the new resource to be gone, both from workspace and index
Actuallly. The new resource is still in the index, though not visible in the  workspace.

More bugs:
If you attempt a commit the added index entry will show up in the commit dialog,
but committing it will fail with:

org.eclipse.jgit.api.errors.JGitInternalException: No changes
at org.eclipse.jgit.api.CommitCommand.createTemporaryIndex(CommitCommand.java:406)
at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:192)
at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:243)
at org.eclipse.egit.core.op.CommitOperation.access$6(CommitOperation.java:222)
at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:186)
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.CommitOperation.execute(CommitOperation.java:196)
at org.eclipse.egit.ui.internal.commit.CommitUI$2.run(CommitUI.java:252)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The error message is quite confusing as the dialog onlt presents the "No changes" in the detail pane.
Comment 1 Robin Rosenberg CLA 2011-05-29 05:42:02 EDT
I had some local patches installed. We don't even get this far with the latest build. Will report against current version separately