Git plugin doesn't use refspec on the first clone/fetch

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Our repositories have lots of references and we only need to build from a single branch from each job. For example, I have a job with refspec +refs/heads/master:refs/remotes/origin/master.

      On the first clone, it does the following:

      Cloning the remote Git repository
      Using shallow clone
      Avoid fetching tags
      Cloning repository https://github.com/foo.git
      > git init /tmp/jenkins/slave1/workspace/sample/smoke-test # timeout=10
      Fetching upstream changes from https://github.com/foo.git
      > git --version # timeout=10
      > git -c core.askpass=true fetch --no-tags --progress https://github.com/foo.git +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=10

            Assignee:
            Unassigned
            Reporter:
            Cuong Tran
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: