CredentialsProvider credentials = JGitUtils.getCredentials( (GitScmProviderRepository) repo );
getLogger().info( "cloning [" + branch + "] to " + fileSet.getBasedir() );
git = Git.cloneRepository().setURI( repository.getFetchUrl() ).setCredentialsProvider( credentials ).setBranch( branch ).setDirectory( fileSet.getBasedir() ).setProgressMonitor( monitor ).call();
}
JGitRemoteInfoCommand remoteInfoCommand = new JGitRemoteInfoCommand();
remoteInfoCommand.setLogger( getLogger() );
RemoteInfoScmResult result = remoteInfoCommand.executeRemoteInfoCommand( repository, fileSet, null );
if(git == null) {
git = Git.open( fileSet.getBasedir() );
}