Skip to content

Commit 457663f

Browse files
committed
py/mkrules.mk: Use partial clone for submodules if available.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 594670e commit 457663f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

py/mkrules.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ submodules:
252252
$(ECHO) "Updating submodules: $(GIT_SUBMODULES)"
253253
ifneq ($(GIT_SUBMODULES),)
254254
$(Q)cd $(TOP) && git submodule sync $(GIT_SUBMODULES)
255-
$(Q)cd $(TOP) && git submodule update --init $(GIT_SUBMODULES)
255+
# If available, do blobless partial clones of submodules to save time and space.
256+
# A blobless partial clone lazily fetches data as needed, but has all the metadata available (tags, etc.).
257+
# Fallback to standard submodule update if blobless isn't available (earlier than 2.36.0)
258+
$(Q)cd $(TOP) && git submodule update --init $(GIT_SUBMODULES) --filter=blob:none || \
259+
git submodule update --init $(GIT_SUBMODULES)
256260
endif
257261
.PHONY: submodules
258262

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy