浅读取和浅克隆 [英] Shallow fetch and shallow clone

查看:108
本文介绍了浅读取和浅克隆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,Jenkins中的Git插件提供了进行浅层克隆的选项.

So, Git plugin in Jenkins offers an option to do Shallow clone.

但不是浅表提取.那可能吗 ?

But not shallow fetch. Is that possible ?

推荐答案

检查配置了浅表克隆的作业的日志:如果工作区已被克隆(浅表),则随后执行同一作业将执行浅表无论如何获取.

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.

即使是简单的 git fetch 也不会超过原始的浅表克隆. (除非您明确使用--depth=--deepen=--unshallow).
这就可以解释为什么詹金斯不提供浅层提取:当在浅层克隆存储库中执行所述提取时,则不需要.

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.

这篇关于浅读取和浅克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆