Source:
private void doSearch() { setMessage(UIText.RepositorySearchDialog_searchRepositoriesMessage); setErrorMessage(null); final Set<String> directories = new HashSet<String>(); final File file = new File(dir.getText()); final boolean lookForNested = lookForNestedButton.getSelection(); if (!file.exists()) return; try { prefs.put(PREF_PATH, file.getCanonicalPath()); try { prefs.flush(); } catch (BackingStoreException e1) { } } catch (IOException e2) { } IRunnableWithProgress action = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { monitor.beginTask( UIText.RepositorySearchDialog_ScanningForRepositories_message, IProgressMonitor.UNKNOWN); try { findGitDirsRecursive(file, directories, monitor, lookForNested); } catch (Exception ex) { Activator .getDefault() .getLog() .log(new Status(IStatus.ERROR, Activator .getPluginId(), ex.getMessage(), ex)); } if (monitor.isCanceled()) { throw new InterruptedException(); } } }; try { getContainer().run(true, true, action); } catch (InvocationTargetException e1) { org.eclipse.egit.ui.Activator.handleError( UIText.RepositorySearchDialog_errorOccurred, e1, true); } catch (InterruptedException e1) { } int foundOld = 0; final TreeSet<String> validDirs = new TreeSet<String>(); for (String foundDir : directories) { if (!fExistingDirectories.contains(foundDir)) { validDirs.add(foundDir); } else { foundOld++; } } if (foundOld > 0) { String message = NLS.bind( UIText.RepositorySearchDialog_SomeDirectoriesHiddenMessage, Integer.valueOf(foundOld)); setMessage(message, IMessageProvider.INFORMATION); } else if (directories.isEmpty()) setMessage(UIText.RepositorySearchDialog_NothingFoundMessage, IMessageProvider.INFORMATION); checkAllItem.setEnabled(!validDirs.isEmpty()); uncheckAllItem.setEnabled(!validDirs.isEmpty()); fTree.clearFilter(); fTreeViewer.setInput(validDirs); fTreeViewer.setAllChecked(true); fUserModifiedTreeSelection = false; enableOk(); }

Target:
private void doSearch() { setMessage(UIText.RepositorySearchDialog_searchRepositoriesMessage); setErrorMessage(null); final Set<String> directories = new HashSet<String>(); final File file = new File(dir.getText()); final boolean lookForNested = lookForNestedButton.getSelection(); if(!file.exists()) return; try { prefs.put(PREF_PATH, file.getCanonicalPath()); try { prefs.flush(); } catch (BackingStoreException e1) { } } catch (IOException e2) { } IRunnableWithProgress action = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { monitor.beginTask( UIText.RepositorySearchDialog_ScanningForRepositories_message, IProgressMonitor.UNKNOWN); try { findGitDirsRecursive(file, directories, monitor, lookForNested); } catch (Exception ex) { Activator .getDefault() .getLog() .log(new Status(IStatus.ERROR, Activator .getPluginId(), ex.getMessage(), ex)); } if (monitor.isCanceled()) { throw new InterruptedException(); } } }; try { getContainer().run(true, true, action); } catch (InvocationTargetException e1) { org.eclipse.egit.ui.Activator.handleError( UIText.RepositorySearchDialog_errorOccurred, e1, true); } catch (InterruptedException e1) { } int foundOld = 0; final TreeSet<String> validDirs = new TreeSet<String>(); for (String foundDir : directories) { if (!fExistingDirectories.contains(foundDir)) { validDirs.add(foundDir); } else { foundOld++; } } if (foundOld > 0) { String message = NLS.bind( UIText.RepositorySearchDialog_SomeDirectoriesHiddenMessage, Integer.valueOf(foundOld)); setMessage(message, IMessageProvider.INFORMATION); } else if (directories.isEmpty()) setMessage(UIText.RepositorySearchDialog_NothingFoundMessage, IMessageProvider.INFORMATION); checkAllItem.setEnabled(!validDirs.isEmpty()); uncheckAllItem.setEnabled(!validDirs.isEmpty()); fTree.clearFilter(); fTreeViewer.setInput(validDirs); fTreeViewer.setAllChecked(true); isUserModifiedTreeSelection = false; enableOk(); }