Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45989

Git client support multiple patterns in getRemoteReferences

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-client-plugin
    • None
    • Windows 32, 64 - All supported versions
      Git-Client plugin version 2.5.0
      Jenkins minimum version 1.625.3

      So that git-plugin discoverBranches can discover non standard branches i.e. branches not in refs/heads/* but other paths (as provided) by ref specs, the git-client plugin needs to be able to accept "pattern" for gitRemoteReferences because current functionality will only accept a single pattern and an attempt to put multiple patterns in the current implementation causes the "pattern" argument to concatenate the patterns as single string which doesn't appear to match anything

          [JENKINS-45989] Git client support multiple patterns in getRemoteReferences

          Mark Waite added a comment -

          Can't you achieve what you're requesting by using multiple refspecs?

          The git drop down (for GitHub and BitBucket and Git) allows adding more refspecs,.

          Mark Waite added a comment - Can't you achieve what you're requesting by using multiple refspecs? The git drop down (for GitHub and BitBucket and Git) allows adding more refspecs,.

          MARK ANDREWS added a comment -

          Yes however it appears (happy to be wrong) that the pattern passed in to git-client getreferences is a string that if passed multiple patterns would be interpreted as a single pattern and thus would not match. Im only making that assumption based on the fact that each argument is added to the arguments collection and multiple patterns would be added as a single argument. I dont know how this expands when git ls-remote is then actually called

          MARK ANDREWS added a comment - Yes however it appears (happy to be wrong) that the pattern passed in to git-client getreferences is a string that if passed multiple patterns would be interpreted as a single pattern and thus would not match. Im only making that assumption based on the fact that each argument is added to the arguments collection and multiple patterns would be added as a single argument. I dont know how this expands when git ls-remote is then actually called

            Unassigned Unassigned
            jolykins MARK ANDREWS
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: