Bug 375682 - Deleting a project inside a folder tracked with GIT(EGIT) delete all project (container folder)
Summary: Deleting a project inside a folder tracked with GIT(EGIT) delete all project ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-03-30 03:19 EDT by Alessio Pollero CLA
Modified: 2013-10-15 10:11 EDT (History)
2 users (show)

See Also:


Attachments
Eclipse Error log (3.06 KB, application/octet-stream)
2012-03-30 03:19 EDT, Alessio Pollero CLA
no flags Details
New Project Creation Dialog ScreenShot (76.40 KB, image/png)
2012-04-03 05:29 EDT, Alessio Pollero CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessio Pollero CLA 2012-03-30 03:19:10 EDT
Build Identifier: Version: 3.7.2 Build id: M20120208-0800

I have created a git repository for multiple project, following this step : http://www.vogella.de/articles/EGit/article.html#multiprojects .

In the repository there were 4 project, then i removed one project from the repository(right click on project in package explorer, then Delete), after that eclipse deleted all the projects inside the repository container folder and the container folder itself giving me a lot of messageBox of error .


Reproducible: Always

Steps to Reproduce:
1.Create a git muliproject repository following this guide : http://www.vogella.de/articles/EGit/article.html#multiprojects
2. Try to delete one of the tracked projects 
3. Eclipse will delete all the projects and the containing folder
Comment 1 Alessio Pollero CLA 2012-03-30 03:19:54 EDT
Created attachment 213372 [details]
Eclipse Error log

Eclipse error log.
Comment 2 Dani Megert CLA 2012-03-30 03:33:35 EDT
Maybe you selected the checkbox 'Delete project contents on disk'?
Comment 3 Alessio Pollero CLA 2012-03-30 03:53:44 EDT
Yes, i have selected the checkbox 'Delete project contents on disk' but only for the single project that i want to delete and not for all :)
Comment 4 Paul Webster CLA 2012-04-02 09:09:41 EDT
I followed the steps and placed to projects in <workspace>/gitmulti git repo.  After a few commits, I selected one project, deleted it, and asked it to "delete from disk"

It deleted the project but left the second one and the gitmulti/.git repo fine.  A refresh on the Git Staging shows only the deleted project files.

Could you please run your steps again in a clean workspace?

PW
Comment 5 Alessio Pollero CLA 2012-04-03 05:26:38 EDT
I have reproduced the issue again, maybe i'm not explained very well in the previous post, so i will explain the problem again :

1. Considering to have a git multi project repository in : /Users/alessio/Documents/git/ureportmanager containing 3 projects in 3 subfolder : project1, project2, project3
2. Then create a fourth project(Plugin Project) in the multirepository and by "mistake" specify in the Location the root folder of the multi projects repo ( /Users/alessio/Documents/git/ureportmanager )
3.  A new project is created in the root folder by eclipse (without creating a new subfolder for the project) 
4. Delete the fourth project checking the flag 'Delete project contents on disk'
5. Everything is deleted by eclipse in the multi project root folder (even the .git folder ... )

If you specify a subfolder(/Users/alessio/Documents/git/ureportmanager/project4) in the New Project creation wizard(Location path), when you delete everything works fine, but in the case you don't specify a subfolder in the location field, eclipse doesn't create automatically a new subfolder(with the name of the project for example) and then when you delete the project it delete everything in the folder and not only the files related to that specific project !

It is a severe problem because if i had not the project backup on my git central repository, restore the project would not have been so simple as a git clone ... But i had lost everything ...
Comment 6 Alessio Pollero CLA 2012-04-03 05:29:20 EDT
Created attachment 213482 [details]
New Project Creation Dialog ScreenShot

Note that the location is the root of the multiproject repository not containing the name of the subfolder for the project.
Comment 7 Paul Webster CLA 2012-04-03 09:31:47 EDT
(In reply to comment #5)
> I have reproduced the issue again, maybe i'm not explained very well in the
> previous post, so i will explain the problem again :
> 
> 1. Considering to have a git multi project repository in :
> /Users/alessio/Documents/git/ureportmanager containing 3 projects in 3
> subfolder : project1, project2, project3
> 2. Then create a fourth project(Plugin Project) in the multirepository and by
> "mistake" specify in the Location the root folder of the multi projects repo (
> /Users/alessio/Documents/git/ureportmanager )

I can't do that.  I get an error in the project creation dialog that gitmulti (the git root directory) overlaps the location of another project.

Or do you mean you didn't have any of the other 3 projects imported when you went to put the fourth project in the multi-git directory?  Or that gitmulti was not contained within the workspace filesystem directory?

PW
Comment 8 Paul Webster CLA 2013-10-15 10:11:46 EDT
.