Skip to content

Commit ae95274

Browse files
committed
use blobless partial clone for make fetch-submodules
1 parent 98bff96 commit ae95274

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,9 @@ clean-stm:
324324
$(MAKE) -C ports/stm BOARD=feather_stm32f405_express clean
325325

326326

327-
# This update will fail because the commits we need aren't the latest on the
328-
# branch. We can ignore that though because we fix it with the second command.
329-
# (Only works for git servers that allow sha fetches.)
327+
# Do blobless partial clones of submodules to save time and space.
328+
# A blobless partial clone lazily fetches data as needed, but has all the metadata available (tags, etc.)
329+
# so it does not have the idiosyncrasies of a shallow clone.
330330
.PHONY: fetch-submodules
331331
fetch-submodules:
332-
git submodule update --init -N --depth 1 || true
333-
git submodule foreach 'git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1'
332+
git submodule update --init --filter=blob:none

0 commit comments

Comments
 (0)