Skip to content

release: gitkit 0.6.0 - #21

Merged
JheisonMB merged 9 commits into
mainfrom
develop
Aug 26, 2026
Merged

release: gitkit 0.6.0#21
JheisonMB merged 9 commits into
mainfrom
develop

Conversation

@JheisonMB

Copy link
Copy Markdown
Collaborator

Six changes. Four came from the backlog; two came from the owner using the tool and finding it wanting.

From the backlog

GK-E — an outdated builtin is recognised, not frozen. detect_builtin compared the entire script character for character against the current version, so any edit to a builtin — a typo fix, a new vendor address — orphaned every repository running the previous one. The migration then absorbed it as 00-preexisting, a hand-written hook gitkit never touches again, and the user kept running the old rule while seeing a successful install. Builtins now carry an identity marker, with exact-content matching kept as the fallback for hooks installed before it existed.

GK-H — commit rules the user defines. The commit-msg builtins were closed, so a team with a ticket prefix or a length limit had to hand-write the hook, which is the thing gitkit exists to prevent. message-rules takes named regex rules from the repo's config, each with its own help text, positive or negative, scoped to the subject or the whole message, validated when configured rather than at someone else's first commit. This closes GK-G as well: a negative subject-scoped rule covers the trailer smuggled in after a semicolon, which the anchored no-trailers pattern misses.

GK-F — the lock reaches further. It blocked commit and push; a rebase went through untouched. pre-rebase joins the default, and reference protection is a separate opt-in axis (--refs) rather than being folded into --all — it is the only lock --no-verify cannot bypass, and that is worth an explicit choice.

GK-UNIN — an uninstall that cleans up after itself. gitkit writes into other people's repositories and had no way out. gitkit uninstall shows its plan and asks first, removes gitkit's parts from every repository in the registry, and restores any hand-written hook it had absorbed.

Found by using it

GK-I — the test suite was writing to the user's real registry. Measured on the maintainer's machine: gitkit status --global printed 4965 lines, 1652 of them dead /tmp paths, against two real repositories; registry.toml was 235 KB and its last write was during a cargo test run. The registry module isolated its own tests, but every other test that installed a hook in a temp repo went through the real HOME. Isolation is now a property of the harness, with a test that fails if the real registry is touched. status --global summarises gone entries in one line and offers --prune.

Verified after installing: 4965 lines → 106, and a prune took the registry from 235 KB to 5.8 KB, 1674 repositories to 17.

GK-J — a hook without the execute bit is dormant, and now says so. Git ignores a non-executable hook silently. gitkit reported one as ~ modified, which is true and beside the point. It now reads:

✗ commit-msg — dormant: not executable, so git ignores it and never runs it;
  also modified: … (fix with `gitkit status --repair`)

Both facts, and the way out. --repair sets the bit on hooks written directly into .git/hooks, not only on dispatcher parts, and --strict fails on a dormant hook. Verified on a real repository whose commit-msg had never run since April.


Gate green at every commit: cargo fmt --all, cargo clippy --all-targets -- -D warnings, 673 tests.

@JheisonMB JheisonMB added the target:main Targets the main branch label Aug 26, 2026
@JheisonMB
JheisonMB merged commit e69dd07 into main Aug 26, 2026
4 checks passed
@JheisonMB
JheisonMB deployed to production August 26, 2026 20:08 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target:main Targets the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant