问题
So, Git plugin in Jenkins offers an option to do Shallow clone.
But not shallow fetch. Is that possible ?
回答1:
Check the log of a job configured with a shallow clone: if the workspace is already cloned (shallow), the subsequent execution of that same job would perform a shallow fetch anyway.
Even a simple git fetch would not fetch past the limit imposed by the original shallow clone. (unless you are using explicitly --depth=
, or --deepen=
, or --unshallow
).
That would explain why Jenkins does not offer a shallow fetch: it is not needed when said fetch is performed inside a shallow cloned repo.
来源:https://stackoverflow.com/questions/41645903/shallow-fetch-and-shallow-clone