| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ize gone entries in status --global
feat: hook identity, user-defined commit rules, a wider lock and an uninstall (0.6.0)
| Back | FazBrowse Home | New Git URL |
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:
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.