scripts/feeds: shallow clone for specific commit update
authorCedric CHEDALEUX <cedric.chedaleux@orange.com>
Mon, 17 Feb 2025 09:41:32 +0000 (10:41 +0100)
committerRobert Marko <robimarko@gmail.com>
Tue, 4 Mar 2025 11:01:38 +0000 (12:01 +0100)
commitefffa8a6084ea534751fe28c90a83a0b486f7176
tree333e66f97fb2ec53387de63f4a60f343592c6639
parentf3a210b7425497155b22e197a4bcdaa034f142fa
scripts/feeds: shallow clone for specific commit update

When a feed is referenced with a specific commit (i.e. <git_url>^<sha1>),
a full clone was performed and a branch was created from the sha1
and named with the sha1. Other git clones operations are shallowed.

As Git does not support clone at a specific commit, let's first perform
a shallow clone to latest commit, then fetch the relevant commit and
finally checkout it (no more 'pseudo' branch).

It saves bandwith and significantly speeds up the feed update process.

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 32d0a57dc10811a24816e51f10e55963f40fe462)
scripts/feeds