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

Shallow clone fetches all tags and ignores refspec

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None

      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.

          [JENKINS-27341] Shallow clone fetches all tags and ignores refspec

          Paul Draper created issue -
          Mark Waite made changes -
          Summary Original: Shallow clone does not work New: Shallow clone fetches all tags and ignores refspec
          Mark Waite made changes -
          Link New: This issue duplicates JENKINS-14572 [ JENKINS-14572 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 161546 ] New: JNJira + In-Review [ 180741 ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: