Repository navigation
Ref pills are now honest about remotes. A branch and the remotes that agree
with it render as one segmented pill (main │ origin) instead of one pill
per decoration, and every remote claim is checked against the repository's own
git remote / refs/remotes listings rather than guessed from an origin/
prefix.
Run it
nix run github:binaryplease/git-graph # serve the repos under the cwd
nix run github:binaryplease/git-graph -- ~/src # serve a specific folderFrom source with Bun: bun install && bun run build && bun run cli -- ~/src.
Changed
- One pill per ref identity. A branch is named once and each remote that
points at the same commit is appended as a further segment, divided by a
hairline. A diverged branch and remote stay two pills, and tags are never
folded in. - The checked-out branch reads as state, not text. The pill keeps the head
colour and gains weight plus a ring, and the commit row carries a
lane-coloured ring that names the branch in its tooltip and to screen
readers. The rawHEAD ->plumbing text is gone, as is the⇅glyph —⇅
is git's own mark for divergence, so it asserted the opposite of the
agreement the pill reports. - The log and commit-detail responses carry the repository's remote names,
so no surface has to guess what a remote is called.
Fixed
- A pill no longer claims sync with a remote that does not exist: remote names
come fromgit remote, filtered byrefs/remotes, so a configured-but-never-
fetched remote cannot claim a same-named local branch, and a repository with
no remotes shows a local branch calledorigin/mainas exactly that. - Remote names containing a slash (
git remote add fork/alice …) are no longer
cut at the first slash; names are matched longest-first. - Decorations are read with
--decorate=shortregardless of the user's
log.decoratesetting —log.decorate=fullin a~/.gitconfigpreviously
broke every pill and its compare link. - Branch listing, the compare membership guard, and default-branch resolution
read full%(refname)values instead of git's ambiguity-sensitive shortening,
which mis-listed a local branch namedorigin/mainand silently dropped
origin/HEAD. - A tag whose name contains a comma (
v1,origin/release) no longer forges a
remote onto an unrelated branch's pill. - A local branch named
remotes/origin/featureis read as the branch it is,
not asorigin'sfeature. - The copy button on a ref pill always yields a ref git can resolve
(origin/shared), even where the pill's label is unqualified (shared). - Opening a file diff no longer spawns the two
gitprocesses that read remote
names it never used.
Breaking for embedders
Only consumers of the git-graph/components subpath are affected; the app and
the bgg CLI are unchanged in shape.
CommitRefRowreplaces the exportedCheckedOutMarker. The ring carries no
name on screen, so it only reads as "checked out" while it sits immediately
before the pills it qualifies — the arrangement, not the marker, is the unit
worth sharing (ADR-0027 Rule 1).CommitGraphtakes a requiredremotesprop (CommitLog.remotes). There is
no default, because an empty array has to mean "this repository has no
remotes" and no value can stand for "the host did not say".
Full changelog: v0.1.0...v0.2.0
MIT licensed. 233 tests, bun test.