Community
Participate
Working Groups
Eclipse 3.6.2 J/EGit 1.2.0.201110021920 After killing Eclipse in bug 360133, I cannot use "Team > Reset > Hard" any more, since I always get the error below. I found bug 350677 comment #1: > To worksround the issue you can delete the lock file (index.lock). > It is contained in the .git directory. This worked, but I shouldn't have to know that as an EGit user. Error Thu Oct 06 19:27:32 CEST 2011 mapping tree for commit java.io.IOException: Cannot lock C:\e\w\R3_6_maintenance_Java7\git\eclipse.jdt.ui\.git\index at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:193) at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:239) at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:896) at org.eclipse.egit.core.op.ResetOperation.checkoutIndex(ResetOperation.java:246) at org.eclipse.egit.core.op.ResetOperation.reset(ResetOperation.java:138) at org.eclipse.egit.core.op.ResetOperation.access$0(ResetOperation.java:115) at org.eclipse.egit.core.op.ResetOperation$1.run(ResetOperation.java:105) 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.ResetOperation.execute(ResetOperation.java:109) at org.eclipse.egit.core.internal.job.JobUtil$1.run(JobUtil.java:50) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
You are right, EGit should be more user friendly here and ask the user if he killed git earlier which may result in such a zombie index.lock file, and if he wants to remove this stale lock file.
Just got hit by this also.
Isn't it a dupe of bug 339781?
*** This bug has been marked as a duplicate of bug 339781 ***