Repository navigation
feat: lazy dependencies, placed only once something asks for them - #5
Merged
Merged
Conversation
antonzherdev
force-pushed
the
anton/lazy-entries
branch
2 times, most recently
from
September 30, 2026 01:29
f62b922 to
5812c97
Compare
antonzherdev
marked this pull request as ready for review
September 30, 2026 01:36
antonzherdev
force-pushed
the
anton/lazy-entries
branch
from
October 23, 2026 06:12
5812c97 to
a425f43
Compare
antonzherdev
force-pushed
the
anton/lazy-entries
branch
from
October 23, 2026 07:42
ede2575 to
8c56a56
Compare
`lazy = true` on an entry leaves the repository out of every placement, with nothing fetched for it, until a command names it (`git scale sync DIR`, `git topic join DIR`), it is on disk, the topic has a branch of it here or on its remote, or another repository asks for it without `lazy`. A workspace overrides the configs with `git scale prefer --lazy|--eager`, and `--committed` hands the choice back; the form preference is unchanged, so a lazy artefact installs its image when named. On a topic, every lazy repository's remote is asked for the topic's branch with one ref advertisement, side by side; one that cannot be asked fails the command rather than reading as "no branch", so `check` cannot pass over a change it did not see. A lazy repository requested under several names is placed and found under one directory, as an implicit checkout is. `prefer --lazy` never takes away what another repository needs, and says which. `prefer --lazy`, and `leave` and `finish` for a checkout `join` brought from nothing, remove it when that loses nothing, an artefact's image included. `ls` shows a repository left out as `lazy`, and `require --lazy` writes the flag. Claude-Session: https://claude.ai/code/session_018fr6kum7myDDnc3cmS6TfH
antonzherdev
force-pushed
the
anton/lazy-entries
branch
from
October 23, 2026 07:58
8c56a56 to
822f1c6
Compare
added 2 commits
October 23, 2026 09:57
…esence Named after `git config --unset`: `git scale prefer --unset DIR...` drops everything this workspace recorded for those repositories, so the configs decide again, and takes no other option beside it. It replaces `--committed`, which only reset the presence. `--source` still drops the form preference alone. Claude-Session: https://claude.ai/code/session_018fr6kum7myDDnc3cmS6TfH
…aises one left out In CI, `sync DIR` placed a lazy repository and then failed in its own scrub step, which resolved again without the name; the next plain `sync` removed it. The scrub now cleans against the placement's resolution, and the repositories a job names are recorded under its job id, so its later commands keep them while a build directory reused by another job does not. `git upgrade DIR` on a lazy dependency that is not placed failed with "not a checkout of this workspace"; it now names it to resolution, as `sync` and `join` do. Claude-Session: https://claude.ai/code/session_018fr6kum7myDDnc3cmS6TfH
# Conflicts: # docs/test-catalog.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lazy dependencies: a repository only some work needs stays off disk, with nothing fetched, until something asks for it. A workspace repository can declare every repository a team has, and each task checks out only what it touches.
The config commits the default;
git scale prefer --lazy|--eageroverrides it per workspace, beside the existing form preference, so--lazy --artefactinstalls an image only when named.prefer --unsetremoves both.A lazy repository is placed when, first match wins:
git topic join DIR,git scale sync DIR, in CI also an earlier command of the same job), it is on disk outside CI, or the topic has its branch (or<topic>@vN) locally or on the remote;--eager, or--lazy, which never overrides another repository's request withoutlazy;lazy = true.On a topic the lazy remotes are asked in parallel. One that cannot be asked fails CI and
git scale check; locally it is a warning and the repository stays out. Offline commands and the git hooks read the store instead.prefer --lazy, andleave/finishfor a checkoutjoinbrought from nothing, remove it when nothing would be lost; an unreadable status keeps it.git upgrade DIRraises one that is not placed.Tests:
tests/it/lazy.rs(24). Not covered: a lazy repository wanted at two majors at once; ignored files go with a removed checkout.Topic state for a root with no commits is #8. Every open PR regenerates
docs/test-catalog.md: whichever merges later rerunsGITSCALE_UPDATE_CATALOG=1 cargo test --test it catalog::.https://claude.ai/code/session_018fr6kum7myDDnc3cmS6TfH