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

Shallow clone fetches all tags and ignores refspec

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have configured a shallow clone, but in the logs I see

      git -c core.askpass=true fetch --tags --progress ssh://git.example.com/example.git +refs/heads/:refs/remotes/origin/ --depth=1

      1. --tags is contrary to my purpose. Fetching all tags is a lot.

      2. The refspec does not seem to obey what I have configured...this is downloading all refs.

      I am interested in only one ref (hence the shallow clone). I should be able to configure it to do

      git -c core.askpass=true fetch --progress ssh://git.example.com/example.git +refs/heads/my-branch:refs/remotes/origin/my-branch --depth=1

      If there is a way to get this behavior, let me know.

        Attachments

          Issue Links

            Activity

            draperp Paul Draper created issue -
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Summary Shallow clone does not work Shallow clone fetches all tags and ignores refspec
            Hide
            markewaite Mark Waite added a comment -

            Would pull request 333 meet your needs

            Show
            markewaite Mark Waite added a comment - Would pull request 333 meet your needs
            markewaite Mark Waite made changes -
            Link This issue duplicates JENKINS-14572 [ JENKINS-14572 ]
            Hide
            markewaite Mark Waite added a comment -

            Git plugin 2.5.1 will include a fix for JENKINS-31393, which honors the refspec provided by the user even on the initial fetch.

            That doesn't resolve the request to not fetch tags, that will need pull request 333.

            Show
            markewaite Mark Waite added a comment - Git plugin 2.5.1 will include a fix for JENKINS-31393 , which honors the refspec provided by the user even on the initial fetch. That doesn't resolve the request to not fetch tags, that will need pull request 333.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 161546 ] JNJira + In-Review [ 180741 ]
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git plugin that added support for honoring refspec on initial clone.

            Show
            markewaite Mark Waite added a comment - Fixed in git plugin that added support for honoring refspec on initial clone.
            markewaite Mark Waite made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              draperp Paul Draper
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: