I tried to find out with the debugger where this empty refspec is coming from (gerrit-trigger, git-client-plugin, git-plugin or jgit). But I was unable to do so.

To unblock myself, I altered the git-client-plugin to ignore empty refspecs with the following hack:

--- a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
+++ b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
@@ -244,8 +244,12 @@ public class CliGitAPIImpl extends LegacyCompatibleGitAPIImpl {
 
                 if (refspecs != null)
                     for (RefSpec rs: refspecs)
-                        if (rs != null)
+                        if (rs != null) {
+                          String refString = rs.toString();
+                          if(!StringUtils.isBlank(refString)) {
                             args.add(rs.toString());
+                          }
+                        }
 
                 if (prune) args.add("--prune");
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to