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

Bug 329031

Summary: LOCK_FAILURE when calling RefUpdate.link from egit leads to broken repo
Product: [Technology] JGit Reporter: Stefan Lay <stefan.lay>
Component: JGitAssignee: Mathias Kinzler <mathias.kinzler>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: christian.halstrick, matthias.sohn
Version: 0.10.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Stefan Lay CLA 2010-10-29 07:51:19 EDT
May be a duplicate of 311117, but I'm not sure.

I checked out master from egit and got the following error:

Updating HEAD to ref: refs/heads/master

java.io.IOException: LOCK_FAILURE
at org.eclipse.egit.core.op.BranchOperation.updateHeadRef(BranchOperation.java:171)
at org.eclipse.egit.core.op.BranchOperation.access$6(BranchOperation.java:139)
at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:118)
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.BranchOperation.execute(BranchOperation.java:129)
at org.eclipse.egit.ui.internal.actions.BranchActionHandler$1.run(BranchActionHandler.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The JGit code which causes the error is RefUpdate.link(String target) 

As a result there was no HEAD file anymore and the repo was therefore broken.
The workaround was easy: I just created a new HEAD file with content ref: refs/heads/master
Comment 1 Matthias Sohn CLA 2012-04-19 03:28:07 EDT
Did you ever see this again in recent version ? Otherwise I would tend to close this as GitIndex was replaced by DirCache