]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
scripts/feeds: shallow clone submodules 18168/head
authorCedric CHEDALEUX <cedric.chedaleux@orange.com>
Mon, 17 Feb 2025 09:44:36 +0000 (10:44 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 5 Mar 2025 13:19:01 +0000 (14:19 +0100)
When a feed has submodules, all its submodules are fully cloned whereas
the feed itself is shallowed. Let's be consistent and perform shallow clones
as well for the submodules.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
Link: https://github.com/openwrt/openwrt/pull/18003
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 9ec32cfb2733856a2ab4caee07d9b3297568381d)
Link: https://github.com/openwrt/openwrt/pull/18168
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
scripts/feeds

index 3df947c9c706eb7609877b4bdf0c894e12a90f7c..f0dea6d040aa1d818e109fe3f800fc286aea372c 100755 (executable)
@@ -160,7 +160,7 @@ my %update_method = (
                'init_commit'   => "git clone --depth 1 '%s' '%s' && cd '%s' && git fetch --depth=1 origin '%s' && git -c advice.detachedHead=false checkout '%s' && cd -",
                'update'        => "git pull --ff-only",
                'update_force'  => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)",
-               'post_update'   => "git submodule update --init --recursive",
+               'post_update'   => "git submodule update --init --recursive --depth 1",
                'controldir'    => ".git",
                'revision'      => "git rev-parse --short HEAD | tr -d '\n'"},
        'src-git-full' => {