scripts/feeds: use partial clone for src-git-full
Partial clone is much faster without clipping history
Signed-off-by: Glen Huang <me@glenhuang.com>
[also apply to include/download.mk]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 3151477727)
This commit is contained in:
parent
5c1af46f28
commit
f6932e9bd5
@ -203,9 +203,9 @@ define DownloadMethod/rawgit
|
||||
cd $(TMP_DIR)/dl && \
|
||||
rm -rf $(SUBDIR) && \
|
||||
[ \! -d $(SUBDIR) ] && \
|
||||
git clone $(OPTS) $(URL) $(SUBDIR) && \
|
||||
git clone --filter=blob:none $(OPTS) $(URL) $(SUBDIR) && \
|
||||
(cd $(SUBDIR) && git checkout $(VERSION) && \
|
||||
git submodule update --init --recursive) && \
|
||||
git submodule update --init --recursive --filter=blob:none) && \
|
||||
echo "Packing checkout..." && \
|
||||
export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 --format='@%ct'` && \
|
||||
rm -rf $(SUBDIR)/.git && \
|
||||
|
||||
@ -164,9 +164,9 @@ my %update_method = (
|
||||
'controldir' => ".git",
|
||||
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
|
||||
'src-git-full' => {
|
||||
'init' => "git clone '%s' '%s'",
|
||||
'init_branch' => "git clone --branch '%s' '%s' '%s'",
|
||||
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
||||
'init' => "git clone --filter=blob:none '%s' '%s'",
|
||||
'init_branch' => "git clone --filter=blob:none --branch '%s' '%s' '%s'",
|
||||
'init_commit' => "git clone --filter=blob:none '%s' '%s' && cd '%s' && git checkout -b '%s' '%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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user