Shallow fetch and shallow clone

梦想的初衷 提交于 2019-12-08 13:44:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!