Skip to main content

Module changed

Module changed 

Source
Expand description

Selecting files from git, for --since and --staged.

These are the incremental entry points from docs/architecture.md §8.4. They answer “what did I touch”, which is a different question from “what is stale” — the cache answers the second, by content hash, and would still do the right thing without these. What they save is reading and hashing every file in the corpus to find that out.

§Shelling out to git

Rather than linking a git implementation. The user’s git already agrees with their configuration — worktrees, submodules, core.excludesFile, a .gitattributes that affects nothing here but might later — and a second implementation would agree until it did not. It is also one dependency instead of a large one.

A failure is reported rather than swallowed. If someone asks for --since main and there is no main, checking everything instead would be a surprising amount of work done silently, and checking nothing would look like a clean run.

Enums§

ChangeError
Why a selection could not be made.

Functions§

since
Files changed against a git ref, including untracked ones.
staged
Files staged in the index.