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

Git plugin fetches all branches before fetching the specified refspec

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • Jenkins 1.609.1, Git plugin 2.4.0, Git Client plugin 1.18.0, Centos 6

      We have a project in several branches where just one branch is needed to build at a time. Some other branches contain a lot of unneeded data. The correct refspec is specified in the job's configuration. But when the job is run, Jenkins first downloads all the refs:
      > /usr/bin/git -c core.askpass=true fetch --tags --progress **url here** +refs/heads/:refs/remotes/origin/ # timeout=30
      Only then, after adding the remote and other operations, it uses the specified ref:
      > /usr/bin/git -c core.askpass=true fetch --tags --progress **url here** +refs/heads/master:refs/remotes/origin/master # timeout=30
      This leads to a big waste of time, as lots of data is actually downloaded but not used at all.

          [JENKINS-31393] Git plugin fetches all branches before fetching the specified refspec

          Marco Sacchetto created issue -
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-36507 [ JENKINS-36507 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 166733 ] New: JNJira + In-Review [ 198038 ]
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-33140 [ JENKINS-33140 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Daniel Geißler made changes -
          Link New: This issue relates to JENKINS-28516 [ JENKINS-28516 ]

            Unassigned Unassigned
            sacchettom Marco Sacchetto
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: