- Fallback fetch pulled only the default branch because a depth-1 clone
is single-branch; fetch all heads and tags so an abbreviated SHA off
the default branch resolves.
- Move the --track guard from CLI flag parsing into InstallTrackedRepo
so the Web UI is covered too, and reject tags as well as SHAs: both
leave HEAD detached with nothing for `git pull` to follow.
- An all-hex branch or tag name (e.g. 20240915) was treated as a SHA in
check and never queried; look the ref up first and fall back to the
literal SHA only when the remote has no such ref. Full 40-char SHAs
still skip the network.
- Rename the git package's 7-char shortHash to abbrevHash to avoid
clashing with install's 12-char helper.
Refs #281
Teams with supply-chain review need reproducible installs, but --branch
only worked for branch names because git clone --branch rejects SHAs.
Clone the default branch and detach at the pinned commit (targeted
depth-1 fetch, falling back to --unshallow for abbreviated SHAs or
servers that refuse arbitrary wants). Resolve tags in check via
refs/tags and the peeled ^{} commit, and short-circuit SHA pins without
a network round-trip since they can never move. Reject --track with a
SHA: a tracked repo must follow a branch to pull.
Closes#281