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

git plugin does not support / in branch names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      git plugin 1.1.9, jenkins 1.423
    • Similar Issues:

      Description

      To reproduce:

      • Set up a job that checks out a project from git
      • Set "Branches to build" specifier to something/somethingelse (that's valid in your git project)
      • Try to build

      This gives me the following error:
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

      Doing the following makes the job build fine:

      • git checkout -b something-somethingelse something/something else
      • git push origin something-somethingelse
      • Set "Branches to build" specifier to something-somethingelse

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            Try origin/something/somethingelse - if it just sees one /, it's going to take the first part as the remote and get confused.

            Show
            abayer Andrew Bayer added a comment - Try origin/something/somethingelse - if it just sees one /, it's going to take the first part as the remote and get confused.
            Hide
            mikij Milutin Jovanovic added a comment -

            A workaroung that works for me is to spacify two branches to build, first master and then the one I actually want to build. Interestingly, only one branch is built this way, the second one.

            Show
            mikij Milutin Jovanovic added a comment - A workaroung that works for me is to spacify two branches to build, first master and then the one I actually want to build. Interestingly, only one branch is built this way, the second one.
            Hide
            ndeloof Nicolas De Loof added a comment -

            using / in branch name is a bad idea as it's confusing with remote name. To disambiguate, need to always set <remote>/<branchnamemaybewithslash>

            Show
            ndeloof Nicolas De Loof added a comment - using / in branch name is a bad idea as it's confusing with remote name. To disambiguate, need to always set <remote>/<branchnamemaybewithslash>

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                jorgenpt Jørgen Tjernø
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: