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

Bug 324705

Summary: [sync] ChangeSet include staged changes in all listed commits
Product: [Technology] EGit Reporter: Dariusz Luksza <dariusz.luksza>
Component: UIAssignee: Dariusz Luksza <dariusz.luksza>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: 0.9.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
screen shot showing staged file inside multiple commits none

Description Dariusz Luksza CLA 2010-09-07 19:14:08 EDT
Created attachment 178367 [details]
screen shot showing staged file inside multiple commits

When there are some staged changes in repository and synchronization is launched files that are added to git index are included in all commits displayed in ChangeSet. Such changes shouldn't be visible inside any commit tree.
Comment 1 Dariusz Luksza CLA 2010-09-08 03:38:07 EDT
The main cause of this issue is commit 4baa618050b1114b20ff89ed7869ac3252b524c6[1], because it iterate over working tree (instead of iterating over given tree that is associated with particular commit.

For a quick fix we could revert this commit. But to have a real fix for this issue I would prefer to implement something like ObjectIdTreeIterator or RevObjectTreeIterator that will iterate over given tree and could check doest given file is ignored.


http://egit.eclipse.org/w/?p=egit.git;a=commit;h=4baa618050b1114b20ff89ed7869ac3252b524c6
Comment 2 Dariusz Luksza CLA 2010-09-08 06:43:09 EDT
I've pushed commit for review[1] that reverts mentioned before commit. This is only a temporary solution because of approaching 0.9 release. 

[1] http://egit.eclipse.org/r/1561
Comment 3 Dariusz Luksza CLA 2010-09-08 19:28:17 EDT
It appears that ChangeSet implementation shouldn't be aware of .gitignore content.

Here is a "real fix" for this issue:
http://egit.eclipse.org/r/#change,1569
Comment 4 Dariusz Luksza CLA 2010-09-09 05:55:50 EDT
Fixed with commit 73b128b4c87e663ede8000cb81529655bf17a8c4