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

More freely defined advanced clone behaviours

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • git-plugin
    • None

    Description

      There is a need for a "More advanced clone behaviors"

      The current "Advanced clone behaviours" takes us just part of the way when needing to configure the clone operation.

      There are a lot of options on git clone that is not possible to set.
      Ref https://git-scm.com/docs/git-clone

      Example:
      We currently have the need to do a shallow clone, but need to include all branches. Meaning that we want to add the --no-single-branch option.
      We cannot see any other way of achieving this right now.

      I assume this request will solve JENKINS-61109 and similar issues as well.

      Attachments

        Issue Links

          Activity

            markewaite Mark Waite added a comment -

            Won't implement this in the git plugin because we prefer advanced clone options be set through a credentials binding as described in https://plugins.jenkins.io/git/#credential-binding

            markewaite Mark Waite added a comment - Won't implement this in the git plugin because we prefer advanced clone options be set through a credentials binding as described in https://plugins.jenkins.io/git/#credential-binding
            markewaite Mark Waite added a comment - - edited

            A shallow clone with all branches is the default when shallow clone is enabled. The default refspec pulls all branches.

            For historical reasons, the Jenkins git plugin uses a combination of git init and git fetch to populate its workspaces. I don't expect that to change in the future because it would be very likely to break many, many Jenkins users. If the git plugin were to use git clone directly, it would need to be through a completely new code path so that the existing behaviors would be retained.

            markewaite Mark Waite added a comment - - edited A shallow clone with all branches is the default when shallow clone is enabled. The default refspec pulls all branches. For historical reasons, the Jenkins git plugin uses a combination of git init and git fetch to populate its workspaces. I don't expect that to change in the future because it would be very likely to break many, many Jenkins users. If the git plugin were to use git clone directly, it would need to be through a completely new code path so that the existing behaviors would be retained.

            People

              Unassigned Unassigned
              soltor0 Tor Christian Solevågseide
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: