summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/mkrules.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk
index 0dc1cdfe15..875ddee852 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -252,7 +252,11 @@ submodules:
$(ECHO) "Updating submodules: $(GIT_SUBMODULES)"
ifneq ($(GIT_SUBMODULES),)
$(Q)cd $(TOP) && git submodule sync $(GIT_SUBMODULES)
- $(Q)cd $(TOP) && git submodule update --init $(GIT_SUBMODULES)
+ # If available, do blobless partial clones of submodules to save time and space.
+ # A blobless partial clone lazily fetches data as needed, but has all the metadata available (tags, etc.).
+ # Fallback to standard submodule update if blobless isn't available (earlier than 2.36.0)
+ $(Q)cd $(TOP) && git submodule update --init --filter=blob:none $(GIT_SUBMODULES) || \
+ git submodule update --init $(GIT_SUBMODULES)
endif
.PHONY: submodules