/** * Fill in the environment variables for launching git * @param env base environment variables */ public void populateEnvironmentVariables(Map<String,String> env) { String name = getGlobalConfigName(); if (name!=null) { env.put("GIT_COMMITTER_NAME", name); env.put("GIT_AUTHOR_NAME", name); } String email = getGlobalConfigEmail(); if (email!=null) { env.put("GIT_COMMITTER_EMAIL", email); env.put("GIT_AUTHOR_EMAIL", email); } }
@Deprecated public String getGitConfigNameToUse() { String n = getGitConfigName(); if (n==null) n = getDescriptor().getGlobalConfigName(); return n; }
public String getGitConfigNameToUse() { String confName; String globalConfigName = ((DescriptorImpl) getDescriptor()).getGlobalConfigName(); if (gitConfigName == null && StringUtils.isNotBlank(globalConfigName)) { confName = globalConfigName; } else { confName = gitConfigName; } return fixEmptyAndTrim(confName); }
/** * {@inheritDoc} */ @Override public GitClient decorate(GitSCM scm, GitClient git) throws IOException, InterruptedException, GitException { GitSCM.DescriptorImpl d = scm.getDescriptor(); String n = d.getGlobalConfigName(); if (name!=null) n = name; String e = d.getGlobalConfigEmail(); if (email!=null) e = email; git.setAuthor(n,e); git.setCommitter(n,e); return git; }
public String getGitConfigNameToUse() { String confName; String globalConfigName = ((DescriptorImpl) getDescriptor()).getGlobalConfigName(); if ((globalConfigName != null) && (gitConfigName == null) && (!fixEmptyAndTrim(globalConfigName).equals(""))) { confName = globalConfigName; } else { confName = gitConfigName; } return fixEmptyAndTrim(confName); }