String gitUserName = toAdd.optString(GitConstants.KEY_NAME, null);
String gitUserMail = toAdd.optString(GitConstants.KEY_MAIL, null);
Boolean initProject = toAdd.optBoolean(GitConstants.KEY_INIT_PROJECT, false);
if (initOnly) {
// git init
InitJob job = new InitJob(clone, TaskJobHandler.getUserId(request), request.getRemoteUser(), cloneLocation, gitUserName, gitUserMail);
return TaskJobHandler.handleTaskJob(request, response, job, statusHandler, JsonURIUnqualificationStrategy.ALL_NO_GIT);
}
// git clone
// prepare creds
GitCredentialsProvider cp = GitUtils.createGitCredentialsProvider(toAdd);