DESCRIPTION

Fixed repository search dialog to detect .git files under selected root.

The search did not detected working tree with .git file in selected root
folder. It always looked in sub-folders only and in case of .git folders
it worked fine. Now it checks the selected root folder additionally to
it's children. The Git private folders like .git folder itself are not
traversed anymore.

This prepares EGit to still properly detect git repositories when
JGit change "https://git.eclipse.org/r/#/c/67873/" adds the evaluation
of ".git" file with "gitdir" link to worktree and evaluates commondir.

Bug: 477475
Change-Id: I9282c3431ca9946159f389168e4ad322ab42838c
Signed-off-by: Genevieve Hudson xxx@xxx.xxx


COMMENTS

author: Genevieve Hudson
date: 2016-03-17 20:53:02.000000000

Uploaded patch set 3: Patch Set 2 was rebased.

-------------------------------------
author: Brenden Conley
date: 2016-03-17 20:53:08.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8305/

-------------------------------------
author: Brenden Conley
date: 2016-03-17 21:22:17.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/8305/ : SUCCESS

-------------------------------------
author: Genevieve Hudson
date: 2016-03-18 09:32:57.000000000

Patch Set 3: Code-Review+1

Now the tests are ok. If this was a temporary problem with or some timing issues - maybe the test repositories are not removed or disconnected sometimes - should be not related to this find dialog.

Sorry i cannot help with tests, i'm new to this and have to learn the UI / SWT test framework...

-------------------------------------
author: Alayna Houston
date: 2016-03-20 10:45:31.000000000

Patch Set 3:

(4 comments)

Line:428, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Since you're touching this anyway, please add the missing braces.

Line:431, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Since you're touching this anyway, please add the missing braces.

Line:436, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> This could just be !Constants.DOT_GIT.equals(child.getName()).

Line:481, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> I wonder... maybe the code gets simpler if we use a depth parameter instead of two booleans. Idea: instead of the two booleans, have a single int depth parameter. Pass here "lookForNested ? -1 : 2". -1 signifies "infinite depth". Replace the if at line 424 by

  if (--depth != 0 && !root.equals(resolved)) {
    ...

and at line 439 just pass on "depth".

-------------------------------------
author: Genevieve Hudson
date: 2016-03-21 20:58:41.000000000

Patch Set 3:

(4 comments)

Thanks, see next PS

Line:428, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Done

Line:431, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Done

Line:436, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Done

Line:481, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Yes, it will be simpler then, thanks! I've implemneted it like it's done in ANT etc. other file selector definitions, e.g. (lookForNested ? -1 : 1), -1 means infinite depth and 1 means base directorty and one directory below that.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-03-22 10:41:20.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

-------------------------------------
