Skip to content

v0.2.0 — ref pills that never guess a remote

Latest

Choose a tag to compare

@escherlies escherlies released this 15 Sep 20:03
· 12 commits to main since this release
v0.2.0
6e308a7

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 folder

From 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 raw HEAD -> 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 from git remote, filtered by refs/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 called origin/main as 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=short regardless of the user's
    log.decorate setting — log.decorate=full in a ~/.gitconfig previously
    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 named origin/main and 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/feature is read as the branch it is,
    not as origin's feature.
  • 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 git processes 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.

  • CommitRefRow replaces the exported CheckedOutMarker. 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).
  • CommitGraph takes a required remotes prop (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.