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

Git Plugin should have an option to use clone instead of init/fetch

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Major Major
    • git-client-plugin
    • None

      git clone is very efficient at downloading large repositories.

      git fetch, can take twice as long as it has to check that each object exists.

      Our repository has 700-800K objects, it's a moderately sized repo, with a lot of history.

      git fetch takes 14 mins, git clone takes about 4 minutes.

      It would be nice to have some control over which method is used.

          [JENKINS-23345] Git Plugin should have an option to use clone instead of init/fetch

          Of course, there is no need to support header expansion. I just wanted to explain why we need the clone functionality and not init+pull. The support for filters in .gitattributes is an official feature of git and we cannot use it with Jenkins. I'll have to write the cloning script and we'll not be able to rely on the built-in git implementation....

          michele hallak-stamler added a comment - Of course, there is no need to support header expansion. I just wanted to explain why we need the clone functionality and not init+pull. The support for filters in .gitattributes is an official feature of git and we cannot use it with Jenkins. I'll have to write the cloning script and we'll not be able to rely on the built-in git implementation....

          Eugene Gunov added a comment -

          The clone functionality is also required to use git extensions for large files such as git-fat.

          Eugene Gunov added a comment - The clone functionality is also required to use git extensions for large files such as git-fat .

          Without Git clone Git LFS does not work at all as it doesn't init LFS properly. We are going to need a solution to this soon, as Git LFS is becoming quite popular among Game Dev software projects. Is there anything in progress?

          Scott Richmond added a comment - Without Git clone Git LFS does not work at all as it doesn't init LFS properly. We are going to need a solution to this soon, as Git LFS is becoming quite popular among Game Dev software projects. Is there anything in progress?

          Mark Waite added a comment -

          Nothing is in progress to switch from init + fetch to clone. There are no pending pull requests for an implementation that will allow switching from one to the other.

          Mark Waite added a comment - Nothing is in progress to switch from init + fetch to clone. There are no pending pull requests for an implementation that will allow switching from one to the other.

          I had a quick scan over the plugin code and I understand that it would be a complex change, for sure. I've raised a ticket over here to discuss solutions that might be less of an impact: https://issues.jenkins-ci.org/browse/JENKINS-30318

          Scott Richmond added a comment - I had a quick scan over the plugin code and I understand that it would be a complex change, for sure. I've raised a ticket over here to discuss solutions that might be less of an impact: https://issues.jenkins-ci.org/browse/JENKINS-30318

          Mark Waite added a comment -

          Jacob Keller has proposed git plugin PR342 and git client plugin PR180 to implement submodule authentication. One of the side effects of his changes for submodule authentication may be that it will be easier / feasible to allow the option to switch from init/fetch to clone.

          Because the git client plugin change alters the authentication technique, we'll need a solid beta test phase before delivering that change to the larger community of Jenkins users.

          Mark Waite added a comment - Jacob Keller has proposed git plugin PR342 and git client plugin PR180 to implement submodule authentication. One of the side effects of his changes for submodule authentication may be that it will be easier / feasible to allow the option to switch from init/fetch to clone. Because the git client plugin change alters the authentication technique, we'll need a solid beta test phase before delivering that change to the larger community of Jenkins users.

          Kevin Chen added a comment -

          Is there an ETA on when this will be resolved? We're also invested in the use of "git clone" being implemented.

          Kevin Chen added a comment - Is there an ETA on when this will be resolved? We're also invested in the use of "git clone" being implemented.

          Mark Waite added a comment -

          There is no ETA for any implementation that will replace the current init/fetch with clone.

          Is your use case one of the use cases already described, or something different?

          Mark Waite added a comment - There is no ETA for any implementation that will replace the current init/fetch with clone. Is your use case one of the use cases already described, or something different?

          Kevin Chen added a comment -

          Our situation is almost identical to the others reported.

          Kevin Chen added a comment - Our situation is almost identical to the others reported.

          Mark Waite added a comment -

          Won't be implemented. We hope in the future to provide a credential binding wrapper so that users who want precise control of the git command can use the wrapper and then call command line git from their pipeline script.

          Mark Waite added a comment - Won't be implemented. We hope in the future to provide a credential binding wrapper so that users who want precise control of the git command can use the wrapper and then call command line git from their pipeline script.

            Unassigned Unassigned
            davedash davedash
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: