for (int i = 0; i < repositories.length; i++) {
Repository repository = repositories[i];
if (mymonitor.isCanceled())
throw new CoreException(Status.CANCEL_STATUS);
IProject[] validProjects = ProjectUtil.getValidOpenProjects(repository);
PullCommand pull = new Git(repository).pull();
PullResult pullResult = null;
try {
pull.setProgressMonitor(new EclipseGitProgressTransformer(
new SubProgressMonitor(mymonitor, 1)));
pull.setTimeout(timeout);
pull.setCredentialsProvider(credentialsProvider);
pullResult = pull.call();
results.put(repository, pullResult);
} catch (DetachedHeadException e) {
results.put(repository, Activator.error(
CoreText.PullOperation_DetachedHeadMessage, e));
} catch (InvalidConfigurationException e) {