From 528043f61f6e75197b879f2464f1dc7ab83c4abd Mon Sep 17 00:00:00 2001 From: Marshal Horn <kamocat@gmail.com> Date: Wed, 18 May 2022 14:20:20 -0700 Subject: [PATCH] Reduced time to clone The git clone can be sped up substantially by skipping the commit history, using the "--depth 1" option. Anyone who actually *wants* the commit history can get it with "git pull" or by looking online. --- src/esp_docs/idf_extensions/gen_version_specific_includes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esp_docs/idf_extensions/gen_version_specific_includes.py b/src/esp_docs/idf_extensions/gen_version_specific_includes.py index 13867e5..c7b355e 100755 --- a/src/esp_docs/idf_extensions/gen_version_specific_includes.py +++ b/src/esp_docs/idf_extensions/gen_version_specific_includes.py @@ -151,9 +151,9 @@ def out_file(basename): return p if version == 'master': - clone_args = '' + clone_args = '--depth 1' else: - clone_args = '-b %s ' % version + clone_args = '-b %s --depth 1' % version with open(out_file('git-clone-bash'), 'w', encoding='utf-8') as f: f.write(templates['git-clone-bash'] % locals())