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

GIT_BRANCH token macro non-fullName parses branch incorrectly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      We use an often ignored feature of git branches where we include "/" characters to show a hierarchy, such as "origin/releases/2011/5". The git plugin supports this well overall, except for the GIT_BRANCH token macro, which if you don't specify fullName reduces it to "5" instead of "releases/2011/5". The GIT_BRANCH token macro should strip off the repository name only and not everything before the last slash.

      Below is where the full git ref spec is documented.
      http://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html

        Attachments

          Activity

          Show
          cgriego Chris Griego added a comment - https://github.com/jenkinsci/git-plugin/pull/20
          Hide
          evernat evernat added a comment -

          The pull request was merged in master a year ago:
          https://github.com/jenkinsci/git-plugin/commit/7530bc9459fa653482d90ee248b5c74d5bd92b76
          So this is fixed.

          Show
          evernat evernat added a comment - The pull request was merged in master a year ago: https://github.com/jenkinsci/git-plugin/commit/7530bc9459fa653482d90ee248b5c74d5bd92b76 So this is fixed.

            People

            • Assignee:
              abayer Andrew Bayer
              Reporter:
              cgriego Chris Griego
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: