Repository navigation
improve: make git installs use a blobless clone - #123835
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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.
|
Codex review: found issues before merge. Reviewed August 14, 2026, 5:24 PM ET / 21:24 UTC. ClawSweeper reviewWhat this changesThe branch makes Merge readinessKeep open: blobless cloning is a sound improvement, but this patch updates only one of three documented Git-install paths, leaving CLI-prefix and Windows Git installs with the costly full clone. The protected Priority: P2 Review scores
Verification
How this fits togetherOpenClaw ships separate interactive Bash, local-prefix Bash, and PowerShell installers, each of which can create a Git checkout before selecting a ref and building OpenClaw. Their clone behavior determines the bandwidth and disk cost of fresh Git installs. flowchart LR
A[Install command] --> B[Choose installer]
B --> C[Create Git checkout]
C --> D[Select release or branch]
D --> E[Install dependencies]
E --> F[Build OpenClaw]
C --> G[Later Git update]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +33, Other +4. Total +37 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the same blobless-clone policy across all three supported Git installers, with focused tests for both Do we have a high-confidence way to reproduce the issue? Yes—current main directly invokes unfiltered clones in each documented Git-install path, and the PR supplies a clean-container before/after run for the interactive Bash path; this review did not rerun the networked clone. Is this the best way to solve the issue? No—the chosen Git option is appropriate, but applying it only to Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 204416747e8d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* 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.
Closes #123823
What Problem This Solves
Fixes an issue where users choosing the homepage-advertised Git install method downloaded the repository's complete blob history before checking out one release tag. In a clean Ubuntu 24.04 container, the clone took 689.08 seconds and occupied 2.8 GB after checking out
v2026.7.1-2, before dependency installation or builds began.Why This Change Was Made
New Git installs now clone with
--filter=blob:none, retaining refs and commit metadata while deferring historical file blobs. This preserves tag switching,--version main, version derivation, and normal fetch/pull updates; unlike--depth 1, it does not make the repository shallow. Git itself warns and continues with a full clone when a server does not support filtering, so the installer does not add a duplicate retry path.User Impact
Git-method installs use substantially less bandwidth, disk, and wall-clock time while remaining ordinary updatable Git checkouts. In the same clean Ubuntu 24.04 measurement, the blobless clone took 77.87 seconds and occupied 641 MB after checking out the same tag and commit—a 9x faster clone and roughly 77% less disk.
Evidence
ubuntu:24.04, Git 2.43.0, direct clone-step comparison using the installer's exact old/new clone flags:git clone ...— 689.08s, 2.8G after checkout;v2026.7.1-2at0790d9f593ad.git clone --filter=blob:none ...— 77.87s, 641M after checkout; the same tag and commit;remote.origin.promisor=true.Using git ref: v2026.7.1-2→Fetching requested version→Checking out v2026.7.1-2.Using git ref: main→Fetching requested version→Checking out main→Updating repository; final branchmain, withremote.origin.promisor=true.--filter=blob:noneinDocumentation/git-clone.txtlines 180–188, andfetch-pack.clines 1179–1184 warnsfiltering not recognized by server, ignoringrather than failing. A local non-filter-capable upload-pack probe exited 0 with that warning.node scripts/run-vitest.mjs test/scripts/install-sh.test.ts— 90/90 passed.bash -n scripts/install.sh— passed.shellcheck -e SC1091 scripts/install.sh scripts/install-cli.sh— passed.git diff --check— passed.AI-assisted implementation; the behavior and dependency contract were independently exercised with the commands above.