Skip to content
Permalink
Browse files

[FIXED JENKINS-13550] Git "Tag to push" should trim whitespace

  • Loading branch information...
ssogabe committed Jun 8, 2012
1 parent 6e4060e commit 39f7ffc016f187ded38767f7e0fb941322eb567e
Showing with 7 additions and 12 deletions.
  1. +7 −12 src/main/java/hudson/plugins/git/GitPublisher.java
@@ -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;
@@ -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;

@@ -450,7 +445,7 @@ private FormValidation checkFieldNotEmpty(String value, String field) {
private String targetRepoName;

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

public String getTargetRepoName() {
@@ -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
@@ -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;
}

0 comments on commit 39f7ffc

Please sign in to comment.
You can’t perform that action at this time.