Skip to content

Commit

Permalink
[FIXED JENKINS-13550] Git "Tag to push" should trim whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ssogabe committed Jun 8, 2012
1 parent 6e4060e commit 39f7ffc
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/main/java/hudson/plugins/git/GitPublisher.java
Expand Up @@ -2,9 +2,10 @@

import hudson.EnvVars;
import hudson.Extension;
import hudson.Launcher;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.Launcher;
import hudson.Util;
import hudson.matrix.MatrixAggregatable;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
Expand All @@ -23,25 +24,19 @@
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
import hudson.util.FormValidation;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;


import org.apache.commons.lang.StringUtils;

import org.eclipse.jgit.transport.RemoteConfig;
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

import org.eclipse.jgit.transport.RemoteConfig;

public class GitPublisher extends Recorder implements Serializable, MatrixAggregatable {
private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -450,7 +445,7 @@ public static abstract class PushConfig extends AbstractDescribableImpl<PushConf
private String targetRepoName;

public PushConfig(String targetRepoName) {
this.targetRepoName = targetRepoName;
this.targetRepoName = Util.fixEmptyAndTrim(targetRepoName);
}

public String getTargetRepoName() {
Expand All @@ -472,7 +467,7 @@ public String getBranchName() {
@DataBoundConstructor
public BranchToPush(String targetRepoName, String branchName) {
super(targetRepoName);
this.branchName = branchName;
this.branchName = Util.fixEmptyAndTrim(branchName);
}

@Extension
Expand All @@ -499,7 +494,7 @@ public boolean isCreateTag() {
@DataBoundConstructor
public TagToPush(String targetRepoName, String tagName, boolean createTag) {
super(targetRepoName);
this.tagName = tagName;
this.tagName = Util.fixEmptyAndTrim(tagName);
this.createTag = createTag;
}

Expand Down

0 comments on commit 39f7ffc

Please sign in to comment.