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

Bug 337578

Summary: egit does not properly remove top level elements on branch switch
Product: [Technology] EGit Reporter: Kay Huber <quorg.xtn>
Component: CoreAssignee: Jens Baumgart <jens.baumgart>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: robin, stefan.lay
Version: 0.11   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Kay Huber CLA 2011-02-18 10:49:14 EST
Steps to reproduce:

* On an empty workspace, create two java project "HelloWorld" and "HelloWorld2"
* add a class to both, share to git, commit
* in the repository view, create a branch of master, called "experimental" (do *not* switch to it just yet)
* delete HelloWorld and HelloWorld in the working directory
* execute "git rm -r HelloWorld" and "git rm -r HelloWorld2" in command line (due to limitation / me-not-knowing-better it seems not to be possible to commit deleted projects from within egit itself... -> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337577 for that)
* commit (should land in master branch)
* in repository view, checkout "experimental" branch -> HelloWorld and HelloWorld2 are added to working directory again (OK)
* in repository view, checkout "master" branch -> HelloWorld and HelloWorld2 remain in working directory -> bad

I cross-checked with native git: the last step (git checkout master) will drop HelloWorld and HelloWorld2 from the current working directory. So this seems to be a limitation / but of egit / jgit.
Comment 1 Robin Stocker CLA 2013-05-18 16:39:35 EDT
This was fixed in bug 374023, marking this as a duplicate.

*** This bug has been marked as a duplicate of bug 374023 ***