-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: git-client-plugin
-
None
-
Environment:Configured for a Multibranch Pipeline: Advanced clone behaviours - Shallow clone
-
4.1.0
As of now (git-client-plugin 3.13.1) shallow clone is unsupported:
[WARNING] JGit doesn't support shallow clone. This flag is ignored
[WARNING] JGit doesn't support shallow clone and therefore depth is meaningless. This flag is ignored
The JGit version is 5.13.1.202206130422-r.
Starting from version 6.3.0, JGit supports shallow cloning: https://projects.eclipse.org/projects/technology.jgit/releases/6.3.0
The issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=475615
Therefore it makes sense to upgrade JGit to at least 6.3.0.
Shallow clone is especially important for an old Git repository with a long history. It speeds up the build and sometimes rescues from OutOfMemoryError.