Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333222 - Replace with -> File in git index fails
Summary: Replace with -> File in git index fails
Status: RESOLVED WORKSFORME
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 336557 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-26 15:17 EST by Robert Munteanu CLA
Modified: 2012-08-20 17:00 EDT (History)
4 users (show)

See Also:


Attachments
workspace (57.98 KB, image/png)
2010-12-26 15:22 EST, Robert Munteanu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2010-12-26 15:17:43 EST
I have a file with local modifications and discarding changes fails. I will attach a screenshot of my repo layout.

-- Error Details --
Date: Sun Dec 26 00:37:24 EET 2010
Message: An internal error occurred during: "Discard Changes".
Severity: Error
Product: Eclipse Platform 3.6.1.v201009090800 (org.eclipse.platform.ide)
Plugin: org.eclipse.core.jobs
Session Data:
eclipse.buildId=M20100909-0800
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86


Exception Stack Trace:
java.lang.NullPointerException
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:808)
at org.eclipse.egit.core.op.DiscardChangesOperation.discardChange(DiscardChangesOperation.java:161)
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 Robert Munteanu CLA 2010-12-26 15:22:22 EST
Created attachment 185821 [details]
workspace
Comment 2 Robert Munteanu CLA 2010-12-26 15:23:14 EST
Running jgit v0.10.1-24-g6533994 and egit v0.10.1-14-g47f21ab .
Comment 3 Robert Munteanu CLA 2010-12-26 15:25:32 EST
When trying to perform a @git checkout@ from the command line, I get the following message:

bc.. 
robert@neghvar:~/git-repos/mylyn-mantis> git checkout com.itsolut.mantis.ui/plugin.xml
fatal: Unable to create '/home/robert/git-repos/mylyn-mantis/.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Comment 4 Jens Baumgart CLA 2011-01-11 10:19:27 EST
I was only able to reproduce the issue on untracked files and opened bug 333979 for this.

Can you execute git status on the command line?
What status is shown for plugin.xml in the command line?
Comment 5 Robert Munteanu CLA 2011-01-11 10:32:06 EST
It was definitely not an untracker resource. But I have since lost the repo state and can't comment.
Comment 6 Tomasz Zarna CLA 2011-08-03 11:50:01 EDT
Isn't it a dupe of bug 336557? The stacktrace from comment 0 looks similar.
Comment 7 Robert Munteanu CLA 2011-08-03 16:08:38 EDT
(In reply to comment #6)
> Isn't it a dupe of bug 336557? The stacktrace from comment 0 looks similar.

Or the other way around, as this bug was reported first. At any rate, the bugs are about the same issue.
Comment 8 Matthias Sohn CLA 2011-08-04 17:55:36 EDT
*** Bug 336557 has been marked as a duplicate of this bug. ***
Comment 9 Robin Rosenberg CLA 2012-08-20 17:00:18 EDT
I cannot repeat and tbis report is old.