Expand description
The one place Alba talks to git: a thin wrapper over the git CLI.
Shelling out rather than linking a library is the same call the docker executor made: no native dependency, and git is present on any machine that has hooks to install. Every function takes the directory to run from; paths come back relative to it.
Structs§
- GitError
- A git invocation that could not answer: git missing from the PATH, no repository, an unknown reference. Carries git’s own words.
- GitHead
- What
HEADlooks like right now. - Known
Hook - A hook git knows, with the number of arguments it passes. Server-side hooks are left out: a developer’s clone never fires them.
Constants§
Functions§
- changed_
files - Every path that differs between
referenceand the working tree (committed since, staged, modified, deleted, renamed) plus every untracked file.gitignoredoes not exclude; relative tocwd, sorted, without duplicates. Paths outsidecwdare not reported. - head
- hooks_
path - The repository-local
core.hooksPath, if set. - known_
hook - repository_
root - The repository’s top-level directory, canonical.
- set_
hooks_ path - unset_
hooks_ path