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

Bug 326640

Summary: Merge conflict reported for irrelevant resources
Product: [Technology] EGit Reporter: Gunnar Wagenknecht <gunnar>
Component: CoreAssignee: Christian Halstrick <christian.halstrick>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn, stefan.lay, tfletche
Version: 0.9.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Gunnar Wagenknecht CLA 2010-09-30 03:53:13 EDT
I was playing with "Team -> Merge..." today and got the following error reported.

> JGitInternalException: Exception caught during execution of merge command.
>  CheckoutConflictException: Checkout conflict with files:
>  hello.android/gen/hello/android/R.java

"hello.android" is in the repo and also imported in Eclipse as a project. There are two additional projects in the same repo and also imported in Eclipse as projects.

The thing is that I did invoke "Team -> Merge..." on one of the other projects but not "hello.android". Invoking "Team -> Merge..." on a project implies that only the selected project would be merged. But it seems that only a whole repository can be merged but not a subset. 

If it's technically impossible to have different projects in a single repo but merged/branched/tagged individually then there should be a warning to users that this operation will also affect projects X/Y/Z. 

Additionally, I'd appreciate an option to "preview" a merge in the Synchronize View. Should I open a separate issue for that?
Comment 1 Matthias Sohn CLA 2013-04-14 18:17:28 EDT
Merge is always a repository level operation in Git [1]. 

Since the effect of a merge can always be reverted by resetting the branch which moved I don't see why a warning should be issued.

In order to preview a merge the merge command actually needs to be executed so what's the benefit of a preview if merge can be reverted by resetting the branch moved by the merge operation ?

[1] https://www.kernel.org/pub/software/scm/git/docs/git-merge.html
Comment 2 Gunnar Wagenknecht CLA 2013-04-15 02:49:46 EDT
Well, over time you get used to it. When entering the bug I was mainly coming for a background where tools in Eclipse operate on a single project. Thus, my main motivation was usability for new users. 

Let's close this as WONTFIX for now.