Bug 374318 - Switching branches opens closed projects and does not close them when switching back
Summary: Switching branches opens closed projects and does not close them when switchi...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 1.3   Edit
Hardware: PC Windows 7
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 17:17 EDT by Sam Davis CLA
Modified: 2018-09-05 03:56 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2012-03-14 17:17:06 EDT
When I switch branches, projects that I specifically closed are opened. I guess this could make sense if they were open the last time I worked on that branch. But then when I switch back to the original branch, they remain open. It is hard enough to get the right set of projects to be open in the first place without them being automatically reopened by a sequence of operations that should leave my workspace in exactly the same state it was in before.
Comment 1 Marc Khouzam CLA 2012-05-17 15:23:36 EDT
I believe this is caused by the Branch Project Tracking feature.  As a workaround you can turn this feature off.  See:
http://wiki.eclipse.org/EGit/New_and_Noteworthy/1.3#Branch_Project_Tracking

But I agree that this is a bug in EGit.  In fact, the problem is worse in the fact that it also happens for deleted projects.  If I delete a project from my workspace, EGit brings it back when I check out another branch.

From the description of the feature:
"Projects are now closed when checking out a branch where that project does not exist and reopened when the previous branch is checked back out."

I believe the goal is that if a project "does not _exist_" in a branch, it will be brought back for a branch where it does exists.  I think this is a cool feature.  I've actually needed it a lot.

I think EGit should limit the feature that case though: when project does not _exist_ in the branch.  If the project is closed or removed from the workspace, it should not trigger the feature.
Comment 2 Sam Davis CLA 2012-05-17 15:50:15 EDT
Yes, I disabled that feature a long time ago. It is a really useful feature though (well, it would be if it worked properly), so I'm not sure that I'm really better off with it disabled. But it should be remembering the open/closed state of projects on a branch.
Comment 3 leokom leokom CLA 2018-09-05 03:56:10 EDT
I confirm the bug still exists