From 824db425b2326acf977f5a5937af517ac4e1da52 Mon Sep 17 00:00:00 2001 From: Osman Karaketir Date: Fri, 15 Nov 2024 20:22:34 +0300 Subject: [PATCH 1/2] reduce submodule clone time and size --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 4449aa00d58..b597a4057c2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -347,7 +347,7 @@ endif $(srcdir)/%/.git: cd $(srcdir) && \ flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \ - flock `git rev-parse --git-dir`/config git submodule update --progress $(dir $@) + flock `git rev-parse --git-dir`/config git submodule update --progress --depth 1 $(dir $@) stamps/install-host-gcc: $(GCC_SRCDIR) $(GCC_SRC_GIT) if test -f $ Date: Sat, 16 Nov 2024 00:04:27 +0300 Subject: [PATCH 2/2] fix for some remotes some remotes do not allow cloning with --depth 1 --- Makefile.in | 3 +-- scripts/clone-submodule.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100755 scripts/clone-submodule.sh diff --git a/Makefile.in b/Makefile.in index b597a4057c2..85c4b10ad96 100644 --- a/Makefile.in +++ b/Makefile.in @@ -346,8 +346,7 @@ endif $(srcdir)/%/.git: cd $(srcdir) && \ - flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \ - flock `git rev-parse --git-dir`/config git submodule update --progress --depth 1 $(dir $@) + flock `git rev-parse --git-dir`/config $(srcdir)/scripts/clone-submodule.sh $(dir $@) $(srcdir) stamps/install-host-gcc: $(GCC_SRCDIR) $(GCC_SRC_GIT) if test -f $