Merge pull request 'Cache successful commits' (#14) from cache into main

Reviewed-on: https://codeberg.org/svenvanheugten/git-check-assertions/pulls/14
This commit is contained in:
Sven van Heugten 2026-03-10 06:50:28 +01:00
commit 1080fc60fd
4 changed files with 80 additions and 1 deletions

View file

@ -77,6 +77,12 @@ You can technically assert that a command fails by writing `! ... || exit 1`, or
I'm considering taking `bats-assert` as a dependency, but for now, this very minimal set of functions with a similar interface should get you on your way.
## Cache of successful commits
After a commit's assertions run successfully, `git-check-assertions` appends the commit hash to `.git-check-assertions-cache` in the repo root. On the next run, any commit listed there is skipped.
Be sure to add `.git-check-assertions-cache` to your `.gitignore`.
## Examples of commit messages
Assert that a commit builds: