mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
improve: make git installs use a blobless clone (#123835)
* perf: use blobless clone in git installer * refactor(install): move clone-filter rationale above the call Keep the file's comment convention (comments on their own lines) instead of a 150-column trailing comment, and record why blob:none is preferred over --depth 1 plus why no fallback is needed. Narrow the ordering test's source needle to the stable prefix so it stops duplicating the behavioral flag assertion and no longer breaks whenever the clone flags change.
This commit is contained in:
committed by
GitHub
parent
e7255b9e8c
commit
d27e318072
+5
-1
@@ -2874,7 +2874,11 @@ install_openclaw_from_git() {
|
||||
validate_git_checkout_head "$repo_dir" || return 1
|
||||
if [[ ! -d "$repo_dir" ]]; then
|
||||
mkdir -p "$(dirname "$repo_dir")"
|
||||
run_quiet_step "Cloning OpenClaw" git clone "$repo_url" "$repo_dir"
|
||||
# Blobless clone: the installer checks out one release tag, so full blob
|
||||
# history is downloaded and then discarded. blob:none keeps ref metadata
|
||||
# (unlike --depth 1) so ref switching and later updates still work, and
|
||||
# git warns and falls back to a full clone if the server cannot filter.
|
||||
run_quiet_step "Cloning OpenClaw" git clone --filter=blob:none "$repo_url" "$repo_dir"
|
||||
fi
|
||||
|
||||
local git_ref
|
||||
|
||||
Reference in New Issue
Block a user