Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329031 - LOCK_FAILURE when calling RefUpdate.link from egit leads to broken repo
Summary: LOCK_FAILURE when calling RefUpdate.link from egit leads to broken repo
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Mathias Kinzler CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-29 07:51 EDT by Stefan Lay CLA
Modified: 2012-04-19 03:28 EDT (History)
2 users (show)

See Also:


Attachments

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