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

Bug 346813

Summary: Rebase failure due to checkout conflicts does not leave repo in SAFE state
Product: [Technology] JGit Reporter: Bernard Leach <leachbj>
Component: JGitAssignee: Bernard Leach <leachbj>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: caniszczyk
Version: 1.0   
Target Milestone: 1.0.0   
Hardware: All   
OS: All   
Whiteboard:

Description Bernard Leach CLA 2011-05-22 10:08:18 EDT
Attempting a rebase that fails due to checkout conflicts (e.g. modify a workspace file that is modified in upstream) leaves the rebasing temporary files in the repository so the repo state is no longer SAFE.  This has the result that egit performs a rebase --abort on the repo which subsequently overwrites local workspace changes.
Comment 1 Bernard Leach CLA 2011-05-22 10:10:04 EDT
To see this problem in eclipse;

1. create file.txt & commit on master
2. create branch side
3. modify file.txt & commit on master
4. checkout side
5. modify file.txt
6. rebase side onto master

The rebase will file with a conflict on file.txt however the local change to file.txt will be overwritten.
Comment 2 Bernard Leach CLA 2011-05-22 10:11:42 EDT
(In reply to comment #1)
> To see this problem in eclipse;
> 
> 1. create file.txt & commit on master
> 2. create branch side
> 3. modify file.txt & commit on master
> 4. checkout side
4a) modify and commit change to file.txt
> 5. modify file.txt
> 6. rebase side onto master
> 
> The rebase will file with a conflict on file.txt however the local change to
> file.txt will be overwritten.
Comment 3 Bernard Leach CLA 2011-05-22 10:22:51 EDT
Proposed fix;

http://egit.eclipse.org/r/#change,3499
Comment 4 Bernard Leach CLA 2011-05-23 18:15:38 EDT
If8b758fde73ed5a452a99a195a844825a03bae1a has been merged and resolves this problem.