} else if (repository.getProviderRepository() instanceof GitScmProviderRepository) {
GitBranchParseCommand command = new GitBranchParseCommand();
command.setLogger(getLogger());
ScmResult execute = command.execute(repository.getProviderRepository(),
new ScmFileSet( scmDirectory ),
new CommandParameters());
String output = execute.getCommandOutput();
getLog().debug("Output: " + output);
String[] split = StringUtils.split(output);
getLog().debug("Split output: " + Arrays.toString(split));
if(split.length<2){
getLog().error( "Cannot get the branch information from the scm repository : " +