-
Improvement
-
Resolution: Won't Fix
-
Major
-
None
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.
- duplicates
-
JENKINS-28335 Pipeline step to run Git commands with credentials & tool
-
- In Review
-
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.