Skip to content

Commit

Permalink
py/mkrules.mk: Use partial clone for submodules if available.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl committed Nov 5, 2024
1 parent 594670e commit 457663f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion py/mkrules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 $(GIT_SUBMODULES) --filter=blob:none || \
git submodule update --init $(GIT_SUBMODULES)
endif
.PHONY: submodules

Expand Down

0 comments on commit 457663f

Please sign in to comment.