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

Git plug-in fetches all tags even when refspec is provided

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Windows Server 2008 Master, Jenkins ver. 1.447.2; Linux Jenkins 1.597, Git plugin 2.2.12.
    • Similar Issues:

      Description

      When a repository is configured to fetch a specific refspec from the upstream repository, all tags are fetched.

      The documentation specifically states that when a refspec is specified, only that refspec will be fetched.

      NOTE: This is not a duplicate of JENKINS-6124. That issue is requesting this to be optional for all cases. This issue is requesting only that the behavior in this specific scenario behave as documented. (i.e. fix the bug)

        Attachments

          Issue Links

            Activity

            Hide
            mmlk Mallik M added a comment -

            Thanks Mark, pre-release plugin worked for me and now plugin is not fetching tags.

            One more observation is "Shallow clone" seems not working always, I am able to point this by looking at console output of my project.
            Yet times I see "--depth 1" with command and not always.

            Is there a way to fix this issue?

            Show
            mmlk Mallik M added a comment - Thanks Mark, pre-release plugin worked for me and now plugin is not fetching tags. One more observation is "Shallow clone" seems not working always, I am able to point this by looking at console output of my project. Yet times I see "--depth 1" with command and not always. Is there a way to fix this issue?
            Hide
            markewaite Mark Waite added a comment -

            Mallik M if there is an issue with shallow clone not consistently remaining a shallow clone, please provide a separate bug report which shows the problem through a series of steps that others can duplicate. Console output is helpful, but is not sufficient evidence that there is a problem.

            Show
            markewaite Mark Waite added a comment - Mallik M if there is an issue with shallow clone not consistently remaining a shallow clone, please provide a separate bug report which shows the problem through a series of steps that others can duplicate. Console output is helpful, but is not sufficient evidence that there is a problem.
            Hide
            markewaite Mark Waite added a comment -

            Included in git plugin 2.4.1 released 26 May 2015

            Show
            markewaite Mark Waite added a comment - Included in git plugin 2.4.1 released 26 May 2015
            Hide
            progman Alexey Ostrovsky added a comment -

            That issue is still there.
            It does work whith branches but not with tags.
            With branches I had to configure "Do not fetch tags" to stop fetching all tags.

            But when I do the same for '+refs/tags/ci-uat' it does not find any release for the build as no any tags fetched.
            If I remove ""Do not fetch tags"" it fetches all tags.

            Refspec: +refs/tags/ci-uat
            Honor refspec on initial clone: enabled

            Jenkins: 2.27
            Git plugin: 3.0.0
            Git client plugin: 2.0.0

            Show
            progman Alexey Ostrovsky added a comment - That issue is still there. It does work whith branches but not with tags. With branches I had to configure "Do not fetch tags" to stop fetching all tags. But when I do the same for '+refs/tags/ci-uat' it does not find any release for the build as no any tags fetched. If I remove ""Do not fetch tags"" it fetches all tags. Refspec: +refs/tags/ci-uat Honor refspec on initial clone: enabled Jenkins: 2.27 Git plugin: 3.0.0 Git client plugin: 2.0.0
            Hide
            progman Alexey Ostrovsky added a comment -

            Git plugin does not respect 'Honor refspec on initial clone' in case if refs pointed to tags.
            All tags are fetched anyway.

            Show
            progman Alexey Ostrovsky added a comment - Git plugin does not respect 'Honor refspec on initial clone' in case if refs pointed to tags. All tags are fetched anyway.

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                dt25954 Douglas Beatty
              • Votes:
                6 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: