Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311051 - Branch operation fails
Summary: Branch operation fails
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 critical (vote)
Target Milestone: 0.9.0-M2   Edit
Assignee: Jens Baumgart CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-29 11:55 EDT by Jens Baumgart CLA
Modified: 2010-08-19 04:35 EDT (History)
3 users (show)

See Also:


Attachments
Thread Dump (3.01 KB, text/plain)
2010-04-29 11:57 EDT, Jens Baumgart CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Baumgart CLA 2010-04-29 11:55:15 EDT
This problem is not always reproducable. You have to execute Team->branch multiple times very fast.

The branch operation fails with:

Caused by: java.io.IOException: Could not rename delete old index
	at org.eclipse.jgit.lib.GitIndex.write(GitIndex.java:296)
	at org.eclipse.egit.core.op.BranchOperation.writeIndex(BranchOperation.java:126)

I could reproduce the problem in the debugger (see attached stack trace). 
The problem is that GitIndex.write can not delete a file that is read by DirCache in the decorator thread.
Comment 1 Jens Baumgart CLA 2010-04-29 11:57:02 EDT
Created attachment 166510 [details]
Thread Dump
Comment 2 Remy Suen CLA 2010-05-05 18:42:10 EDT
Just hit this today. The error message should also be corrected as "Could not rename delete old index" doesn't make any sense.
Comment 3 Jens Baumgart CLA 2010-08-04 09:51:29 EDT
Fixed with http://egit.eclipse.org/r/#change,1152