Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350878 - Import projects from the repository shows "no projects found"
Summary: Import projects from the repository shows "no projects found"
Status: CLOSED WORKSFORME
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 15:30 EDT by Oleg Besedin CLA
Modified: 2013-09-29 15:46 EDT (History)
5 users (show)

See Also:


Attachments
Screenshot (36.71 KB, image/png)
2011-06-30 15:30 EDT, Oleg Besedin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2011-06-30 15:30:33 EDT
Created attachment 198930 [details]
Screenshot

This scenario encountered in a production environment would likely mean loss of all changes not pushed to the upstream repository:

1. Imported projects from repository git.eclipse.org/gitroot/platform/eclipse.platform.ui.git

2. Tried to switch to an R36 maintenance branch, encountered some exceptions on the way

3. It seemed that projects were partially on master, partially on 36 branch

4. Deleted all projects from the workspace, deleting projects from the disk

5.  Tried to import projects from the same clone, but now it says "No projects found" and has an empty list of projects.


Restarting Eclipse did not help; workspace is empty.
Comment 1 Oleg Besedin CLA 2011-06-30 15:53:24 EDT
See bug 350880 for detailed steps "2" and "3".
Comment 2 Krzysztof Daniel CLA 2011-09-23 07:50:29 EDT
The issue is caused by deleting projects from disc. It looks like git is not copying files into a workspace, but just working on the git repo wherever it is.

So if you delete projects from disc, you delete them from repo - and you cannot import them again.

I think it should be impossible to delete files on disc if they come from git.
Comment 3 Matthias Sohn CLA 2011-09-30 18:59:30 EDT
You should be able to recover from this situation by clicking "Team > Reset" to HEAD with option "hard" this should revert the deletion you did in the file system and bring back these files from the repository database. As a general rule you can assume it's really hard to completely destroy any file you added or committed to the git repository since already on "add" a snapshot of the file(s) being added is copied into the repository's object database.
So if you really want to get rid of the file you need to also erase it from the repository.

If we would disallow deletion from disk how would you be able to delete a resource and commit this deletion into the repository ?

I think what you describe here is not a bug, I also couldn't reproduce bug 350880 with the latest nightly, so it seems this has been already fixed in the meantime.
Comment 4 Robin Stocker CLA 2013-09-29 15:46:48 EDT
Closing as worksforme, see comment by Matthias.