<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-pre-commit-hook.bats, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-07-24T14:02:29+00:00</updated>
<entry>
<title>fix(githooks): stop the secret scan passing when it read nothing</title>
<updated>2026-07-24T14:02:29+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-24T14:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1b86dd5b738d9b0b272f0d01b8913b2ae8938e78'/>
<id>urn:sha1:1b86dd5b738d9b0b272f0d01b8913b2ae8938e78</id>
<content type='text'>
- The scan piped git diff into grep and swallowed failures with || true.
- grep exits 1 on no matches, which is normal, so the guard had to stay.
- But it also hid a git failure, leaving nothing to scan and reporting clean.
- Now the diff is read on its own and a git failure aborts the commit.
- The staged-file list feeding the paren check had the same hole.
- New bats tests drive a broken git and pin both paths.
</content>
</entry>
</feed>
