This release adds {{ hook_stdin }} for forwarding git hook stdin to step commands (completing git-lfs support started in v1.42.0), introduces a built-in harper grammar checker, and ships Linux musl binaries for Alpine and other musl-based distributions.
Highlights
{{ hook_stdin }}template variable completes git-lfs pre-push support -- LFS objects are now properly uploaded duringgit push- harper-cli builtin adds grammar checking as a first-class linter
- Linux musl release binaries for Alpine and other musl-based distros
- hk is back on crates.io -- installable via
cargo install hkagain
Added
-
{{ hook_stdin }}template variable: Step commands can now receive the raw stdin that git passes to hook scripts via thestdinfield. This is essential forgit lfs pre-push, which needs the ref data piped through stdin to know which LFS objects to upload. Without this,git lfs pre-pushwould silently succeed but upload nothing, causing the remote to reject the push. The variable is available inpre-pushandpost-rewritehooks. (@JohanLorenzo) #825hooks { ["pre-push"] { steps { ["git-lfs"] { check = "git lfs pre-push {{ hook_args }}" stdin = "{{ hook_stdin }}" } } } }
For
pre-push,{{ hook_stdin }}contains the ref lines that git pipes in (e.g.,refs/heads/main <local-sha> refs/heads/main <remote-sha>). Forpost-rewrite, it contains the old/new SHA mapping lines. When stdin is a terminal (no piped data), it expands to an empty string. -
Built-in
harperandharper_commit_messagelinter steps: harper-cli is now available as a builtin linter for grammar checking prose and documentation. Theharperstep runs against text files, whileharper_commit_messagechecks commit messages. (@hituzi-no-sippo) #714 -
Linux musl release binaries: Pre-built binaries for
x86_64-unknown-linux-muslandaarch64-unknown-linux-muslare now included in releases, making hk easy to install on Alpine Linux and other musl-based distributions. (@jdx) #829 -
hk is published to crates.io again: The crate had been stuck at v1.10.1 since August 2025 after the publish step was accidentally dropped during a build system migration. Starting with this release,
cargo install hkwill get the latest version. (@jdx) #830
New Contributors
- @hituzi-no-sippo made their first contribution in #714
Full Changelog: v1.42.0...v1.43.0