Skip to content

feat!: install with Homebrew, update dependencies and fix multiple bugs - #61

Merged
bircni merged 5 commits into
mainfrom
feat/homebrew-and-review-fixes
Oct 18, 2026
Merged

bircni merged 5 commits into
mainfrom
feat/homebrew-and-review-fixes

Conversation

@bircni

@bircni bircni commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Closes #50

Warning

Breaking: building needs Rust 1.99, and a detached HEAD is reported differently. See Compatibility below.

Homebrew

brew install bircni/tap/git-statuses installs the prebuilt release binary (macOS Apple Silicon and Intel, Linux x86_64) together with bash, zsh and fish completions.

  • scripts/homebrew_formula.sh renders the formula from the release archives and their SHA-256 sums. It fails when an archive is missing, so a tag that does not match Cargo.toml cannot publish a broken formula.
  • A new homebrew job in the release workflow pushes it to bircni/homebrew-tap with the HOMEBREW_TAP_DEPLOY_KEY deploy key, the same way aitrack updates its cask. Prereleases are skipped. The deploy key and the secret are already configured.
  • The tap already carries the formula for 0.8.2, so the install works before the next release.

Fixes

Area Before After
--subdir a checkout that cannot be opened is reported as checkout, for every project reported under the project's name
Symlinked repository Directory column shows the absolute target path shows the link's name
Unborn branch feature/x x (no commits) feature/x (no commits)
Detached HEAD Local column says local-only, counted as a local-only branch -, not counted; JSON has is_detached
--fetch each parallel git fetch can prompt for credentials on the terminal at once GIT_TERMINAL_PROMPT=0: they fail with the existing fetch warning
--json release builds never name failed repositories on stderr listed on stderr, as in table mode
Legend Detached claims to cover branches without an upstream describes a detached HEAD only

Test suite

main is red on Rust 1.99: clippy's new assert_is_empty lint fails CI, and two bare-repository tests fail on macOS because they pass a non-canonical temp path. Beyond fixing those:

  • tests that only ran code now assert on its output, assertions that could not fail are replaced, and duplicated tests are gone
  • no network access, worktrees come from git2 instead of the git CLI (so a global git config or hook cannot interfere), and nothing depends on the machine's init.defaultBranch
  • new coverage for --fetch behind counts, --ff on diverged, conflicting and detached repositories, fetching from a worktree, and nested and symlinked repositories
  • every fix above comes with a test that fails without it

Dependencies and CI

  • comfy-table 8.0.1, insta 1.49 and a lockfile refresh; strum's derive feature replaces the separate strum_macros dependency
  • rust-version = "1.99"
  • release workflow: dtolnay/rust-toolchain instead of the archived actions-rs, $GITHUB_OUTPUT instead of set-output, --locked builds instead of a cargo update at release time, no unused OpenSSL install on macOS, current action versions
  • CI: typos and cargo-binstall pinned to releases instead of running from master/main, read-only token by default
  • README: Homebrew install, a usage block matching --help (it lacked --ff and --json), and the table's actual columns

Compatibility

  • Building from source needs Rust 1.99. cargo install on an older toolchain stops with a version error.
  • A detached HEAD shows - instead of local-only and no longer counts towards "Local-only branches".
  • JSON output gains an is_detached field.
  • A repository reached through a symlink is listed under the link's name.
  • --fetch no longer lets git prompt for HTTPS credentials. Credential helpers and the SSH agent still apply.

The Commits column still walks each repository's full history. On gitea (21.8k commits) that is about 0.14 s of a 0.21 s run, which does not justify dropping a default column.

- comfy-table 8.0.1, insta 1.49 and a lockfile refresh
- rust-version = "1.99", so the toolchain requirement is enforced
  instead of only stated in the README
- strum's `derive` feature instead of a separate strum_macros dependency
Fixes:
- scan: with --subdir, a checkout that cannot be opened is reported under
  the project's name rather than the subdir's, which was the same for all
- scan: a symlinked repository is shown under the link's name instead of
  its absolute target path, by taking the shown path from the walk
- gitinfo: an unborn branch keeps its full name (`feature/x`, not `x`)
- gitinfo: a detached HEAD is no longer local-only; the Local column
  shows `-`, the summary stops counting it and JSON gains `is_detached`
- gitinfo: `--fetch` runs git with GIT_TERMINAL_PROMPT=0, so the parallel
  fetches fail instead of blocking on interleaved credential prompts
- cli: failed repositories are listed on stderr in --json mode as well
- status: the Detached description no longer claims to cover branches
  without an upstream, which are Unpublished

Tests:
- fix clippy 1.99's assert_is_empty lint and the macOS temp-path failures
- assert on the output of tests that only ran code, replace assertions
  that could not fail, and drop duplicated tests
- no network access, no git CLI for fixtures, and no dependence on the
  machine's init.defaultBranch
- cover --fetch behind counts, --ff on diverged, conflicting and detached
  repositories, fetching from a worktree, and nested and symlinked
  repositories
The release workflow renders Formula/git-statuses.rb from the archives it
built with scripts/homebrew_formula.sh and pushes it to the tap with the
HOMEBREW_TAP_DEPLOY_KEY deploy key. Prereleases are skipped.

The workflow is modernized along the way: dtolnay/rust-toolchain instead
of the archived actions-rs, $GITHUB_OUTPUT instead of set-output, --locked
builds instead of a `cargo update` at release time, no OpenSSL install on
macOS where it was unused, and current action versions.

Closes #50
crate-ci/typos and cargo-bins/cargo-binstall ran from their default
branches. Both workflows now also default to a read-only token, like the
release workflow already does.
@bircni bircni changed the title feat!: install with Homebrew, update dependencies and fix review findings feat!: install with Homebrew, update dependencies and fix multiple bugs Oct 18, 2026
@bircni
bircni merged commit c5a1a06 into main Oct 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFE: request for a brew install(able) git-statuses

1 participant