public void updateSources(BuildProgressLogger logger, File workingDirectory, VcsRoot root, String version, IncludeRule includeRule) throws VcsException {
GitConfiguration configuration = GitConfiguration.createAgentConfiguration(root, workingDirectory);
if (!configuration.isProjectDirectoryARepository()) {
workingDirectory.delete();
CloneCommand cmd = new CloneCommand(configuration);
cmd.run(false);
}
else {
FetchCommand cmd = new FetchCommand(configuration);
cmd.run();
}