| Summary: | File checkout randomly fails for a file unstaged a moment before | ||
|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Tomasz Zarna <tomasz.zarna> |
| Component: | JGit | Assignee: | Christian Halstrick <christian.halstrick> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | caniszczyk, christian.halstrick, kevin, matthias.sohn, sop |
| Version: | 1.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| URL: | http://egit.eclipse.org/r/4047 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 352348 | ||
|
Description
Tomasz Zarna
Kevin, you seem to be the right person to ask what's going on here. You added the org.eclipse.jgit.api.CheckoutCommand.checkoutPaths() method. I'm eager to start working on a fix if someone give me some tips where to start. Could you? FWIW it fails on Linux as well, but it takes longer: after 30+ iterations when on Windows it happens usually after 2-5 attempts. Shawn, any thoughts? (In reply to comment #1) > Kevin, you seem to be the right person to ask what's going on here. You added > the org.eclipse.jgit.api.CheckoutCommand.checkoutPaths() method. I'm eager to > start working on a fix if someone give me some tips where to start. Could you? I'm not sure what is going on, but you only see it when doing a selective patch checkout? (In reply to comment #4) > I'm not sure what is going on, but you only see it when doing a selective patch > checkout? *selective path (In reply to comment #4) > I'm not sure what is going on, but you only see it when doing a selective patch > checkout? Yep, checking out branches works fine. I think the problem (and a solution) is found. See http://egit.eclipse.org/r/#change,4296. Selective checkouts potentially left the index in an inconsistent state. Even native git tools have been confused by the index we produced. What also fits is that this problem is related to timing & platform. If you are very fast (e.g. when adding, committing very fast in junit test) then index entries get smudged (their lenght is set to 0) and wrong length information is not persisted - which is good in this case. And the smuding behaviour is quite different on different filesystems (platforms). Tomasz, could you confirm that with the solution in the listed change you don't see that problem anymore? Yup, I can confirm that the fix from http://egit.eclipse.org/r/#change,4296 makes my test from http://egit.eclipse.org/r/4047 no longer fail. I would suggest copying the test to http://egit.eclipse.org/r/#change,4296, but given the way it works I'm afraid it's no use. I've also verified that with your fix, tests I prepared for bug 352348 pass now. The bad news is that test from bug 353867 (http://egit.eclipse.org/r/3957) still fails, but I haven't looked at it more carefully. Let me know if I can be of any more help. change 4296 was merged as 1230d353d8583acfd0df5b3ecdd6aeb04817c692 can we close this now ? Yes. Works like a charm now. Thanks! Resolving as fixed |