diff --git a/.changeset/hook-skips-when-index-not-tracked.md b/.changeset/hook-skips-when-index-not-tracked.md deleted file mode 100644 index 91895a2..0000000 --- a/.changeset/hook-skips-when-index-not-tracked.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@zettelgeist/cli': patch ---- - -Pre-commit hook now also self-disables on branches where `specs/INDEX.md` is not part of the branch's git history. Before this, a back-in-time checkout (or a fresh `zettelgeist init` before the first `regen`) blocked every commit with `error: specs/INDEX.md is missing` because the hook's `regen --check` had nothing to compare against. The hook now performs a `git ls-files --error-unmatch specs/INDEX.md` pre-flight: if the index file isn't tracked on this branch, there's nothing to be stale about and the hook exits 0. Re-run `zettelgeist install-hook` to update existing hooks. The full pre-commit flow now also has end-to-end test coverage in `@zettelgeist/git-hook`'s test suite, regression-guarding both this bug and the earlier non-zg-repo bug. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index f276413..2dc92c0 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @zettelgeist/cli +## 0.4.2 + +### Patch Changes + +- [#17](https://github.com/morrieinmaas/zettelgeist/pull/17) [`95a7adc`](https://github.com/morrieinmaas/zettelgeist/commit/95a7adc18e38d63fbc8de3cef3c95f2fa869b167) Thanks [@morrieinmaas](https://github.com/morrieinmaas)! - Pre-commit hook now also self-disables on branches where `specs/INDEX.md` is not part of the branch's git history. Before this, a back-in-time checkout (or a fresh `zettelgeist init` before the first `regen`) blocked every commit with `error: specs/INDEX.md is missing` because the hook's `regen --check` had nothing to compare against. The hook now performs a `git ls-files --error-unmatch specs/INDEX.md` pre-flight: if the index file isn't tracked on this branch, there's nothing to be stale about and the hook exits 0. Re-run `zettelgeist install-hook` to update existing hooks. The full pre-commit flow now also has end-to-end test coverage in `@zettelgeist/git-hook`'s test suite, regression-guarding both this bug and the earlier non-zg-repo bug. + ## 0.4.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index af4b2d3..32d9bca 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zettelgeist/cli", - "version": "0.4.1", + "version": "0.4.2", "license": "Apache-2.0", "author": "Mo ", "description": "Zettelgeist CLI: regen, validate, install-hook, serve, export-doc commands.",