Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.

Commit 5a1645e

Browse files
committed
Sparse clone exclude blob files
1 parent 333a91e commit 5a1645e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

diy-mini.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# 更改默认 Shell 为 zsh
77
# sed -i 's/\/bin\/ash/\/usr\/bin\/zsh/g' package/base-files/files/etc/passwd
88

9-
# TTYD 自动登录
9+
# TTYD 免登录
1010
# sed -i 's|/bin/login|/bin/login -f root|g' feeds/packages/utils/ttyd/files/ttyd.config
1111

1212
# 移除要替换的包
@@ -20,7 +20,7 @@ rm -rf feeds/luci/applications/luci-app-netdata
2020
# Git稀疏克隆,只克隆指定目录到本地
2121
function git_sparse_clone() {
2222
branch="$1" repourl="$2" && shift 2
23-
git clone --depth=1 -b $branch --single-branch --sparse $repourl
23+
git clone --depth=1 -b $branch --single-branch --filter=blob:none --sparse $repourl
2424
repodir=$(echo $repourl | awk -F '/' '{print $(NF)}')
2525
cd $repodir && git sparse-checkout set $@
2626
mv -f $@ ../package

diy-script.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# 更改默认 Shell 为 zsh
77
# sed -i 's/\/bin\/ash/\/usr\/bin\/zsh/g' package/base-files/files/etc/passwd
88

9-
# TTYD 自动登录
9+
# TTYD 免登录
1010
# sed -i 's|/bin/login|/bin/login -f root|g' feeds/packages/utils/ttyd/files/ttyd.config
1111

1212
# 移除要替换的包
@@ -22,7 +22,7 @@ rm -rf feeds/luci/applications/luci-app-serverchan
2222
# Git稀疏克隆,只克隆指定目录到本地
2323
function git_sparse_clone() {
2424
branch="$1" repourl="$2" && shift 2
25-
git clone --depth=1 -b $branch --single-branch --sparse $repourl
25+
git clone --depth=1 -b $branch --single-branch --filter=blob:none --sparse $repourl
2626
repodir=$(echo $repourl | awk -F '/' '{print $(NF)}')
2727
cd $repodir && git sparse-checkout set $@
2828
mv -f $@ ../package

0 commit comments

Comments
 (0)