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

Bug 315285

Summary: Adding existing Git repository in Git Repository view scans .metadata workspace folder
Product: [Technology] EGit Reporter: Kay Huber <quorg.xtn>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mathias.kinzler, matthias.sohn
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Kay Huber CLA 2010-06-01 15:26:03 EDT
Using latest nightly EGit 0.8.0.201005311531 and JGit 0.8.0.201005300828

In the "Git Repository" view, when I press the rightmost "Add an existing git repository" button, it opens the "search git repositories" dialog. That dialog has the workspace folder set as default and instantly starts scanning for .git folders.
That scan includes the .metadata folder, which is unnecessary.

IMHO not scanning automatically, or not scanning .metadata folders are better options.
Comment 1 Mathias Kinzler CLA 2010-06-02 13:02:11 EDT
> IMHO not scanning automatically, or not scanning .metadata folders are better
> options.

This dialog has gone through several iterations now... Originally, there was a "Search" button that would start the scan (the directory is remembered between calls, but the list would always be empty when the dialog comes up). This button was considered to be bad in terms of usability, so it was removed. There is now also a feature to start a scan automatically whenever a valid path is entered in the "Directory" field... Not sure about all this.
Maybe we'll have to add the "Search" button again and enable/disable it depending on whether a valid path is entered in the "Directory" field? The user would still have to push it, but giving this kind of feedback might help them to see that they need to push at all... Any opinions?
Comment 2 Kay Huber CLA 2010-06-02 13:09:31 EDT
What about just excluding certain (hardcoded?) folders such as the .metadata one? IMO it's ok to scan the workspace, but .metadata will not provide git repos of interest.
Comment 3 Mathias Kinzler CLA 2010-06-02 13:14:47 EDT
(In reply to comment #2)
> What about just excluding certain (hardcoded?) folders such as the .metadata
> one? IMO it's ok to scan the workspace, but .metadata will not provide git
> repos of interest.

I don't think that's worth it, the user may set the directory to C:\ or dev/disk0/ or whatever and then we have the same problem. Actually, importing Repositories into the Eclipse workspace is probably something most people wouldn't do, so perhaps we should rather get rid of the initial proposal for the "Directory" field...
Comment 4 Mathias Kinzler CLA 2010-06-07 07:19:02 EDT
Code review on Gerrit:

http://egit.eclipse.org/r/#change,813
Comment 5 Matthias Sohn CLA 2010-06-12 17:32:19 EDT
merged as 2beb17486fdb4874a3bb6b033512ecf37180e351