Bug 446202 - Certain files go "has changes and unsaved" when switching branches
Summary: Certain files go "has changes and unsaved" when switching branches
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-07 14:04 EDT by Ricky Veach CLA
Modified: 2014-10-07 14:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricky Veach CLA 2014-10-07 14:04:10 EDT
I have noticed that when switching branches while having certain files open for edit in Eclipse are forced into a "Has changed but not saved" state with the "*" next to the file name tab.

I have made no changes in the file but the contents may have changed when switching branches. It makes me think I changed the file and forgot to save it when it was already saved and committed before.

I believe this only happens for certain file types when their contents change during the branch switch. I haven't seen this happen for java files, but for 'jsp' and 'properties' files.

Steps to reproduce:

1) Open up an eclipse project with a git repository
2) Open up one of the file types in the editor:
properties, jsp

I believe the files opened must have changes between the 2 different branches.

3) Don't make any modifications to the opened file, but leave them open
4) Switch branch in egit

The files that were just opened and not changed are now marked with an "*" in the file name tab signifying that I made a change and the file unsaved.