title: Jenkins throws java.lang.IllegalArgumentException: Invalid refspec refs/heads/** Error
body: <p>I am trying to activate a pipeline on any merge request change. This works as long as my pipeline script is in <code>Jenkins UI</code>. Now I outsourced my script on <code>GitLab</code>, and the checkout should happen via the pipeline via scm option.</p>
  
  <p>But all I get on build (yes, it triggers) is:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: Invalid refspec refs/heads/**</p>
  </blockquote>
  
  <p>This happens if I leave the branch specifier empty, this is because I want to listen to any change. If I specify the branch, the build goes through.</p>
  
  <p>My refspec:</p>
  
  <pre><code>+refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
  </code></pre>