Commit graph

20 commits

Author SHA1 Message Date
3dc9930dbb
Make run stream the output 2026-03-11 23:02:38 +01:00
69f8acad8f
Print block number and remove redundant commit hash 2026-03-11 23:02:38 +01:00
32871dc261
Remove redundant newline 2026-03-11 23:02:38 +01:00
35584c9aa7
Restore the commit between assertion blocks
```git-check-assertions
run ./test/git-check-assertions.bats
assert_success

git checkout HEAD~ bin
run ./test/git-check-assertions.bats
assert_failure
assert_output --partial "not ok 10 should restore the commit between assertion blocks in one commit message"
```
2026-03-11 22:41:44 +01:00
7e483b8a7f
Add support for multiple git-check-assertions blocks 2026-03-11 22:41:44 +01:00
210dd4d72d
Fix build
```git-check-assertions
run nix build
assert_success

git checkout HEAD~
run nix build
assert_failure
assert_output --partial "done <.git-check-assertions-cache"
```
2026-03-10 17:39:25 +01:00
e647b2599b
Cache successful commits
```git-check-assertions
run test/git-check-assertions.bats
assert_success

git checkout HEAD~1 bin
run test/git-check-assertions.bats
assert_failure
assert_output --partial "file exists, but it was expected to be absent"
```
2026-03-10 06:49:23 +01:00
fea90637e3
Print a message when all went well 2026-03-06 17:50:28 +01:00
495f6757dd
Make 'run' print the command output
```git-check-assertions
run test/git-check-assertions.bats
assert_success

git checkout HEAD~1 bin
run test/git-check-assertions.bats
assert_failure
```
2026-03-06 05:21:50 +01:00
a31bc62046
Check initial state before running
```git-check-assertions
run test/git-check-assertions.bats
assert_success

git checkout HEAD~1 bin
run test/git-check-assertions.bats
assert_failure
assert_output --partial "not ok 2 should refuse to run when the index has changes"
assert_output --partial "not ok 3 should refuse to run when the working tree has changes"
assert_output --partial "not ok 4 should refuse to run when there are untracked files"
```
2026-03-06 05:12:00 +01:00
dc74688ce9
Restore the index after every commit
```git-check-assertions
run ./test/git-check-assertions.bats
assert_success
```
2026-03-06 04:47:28 +01:00
9ecec1ee6d
Add support for when the base branch is called master
```git-check-assertions
run ./test/git-check-assertions.bats
assert_success
```
2026-03-04 07:58:37 +01:00
2299ee3407
Restore the worktree after a failure
```git-check-assertions
run ./test/git-check-assertions.bats
assert_success
```
2026-03-04 07:40:23 +01:00
d244a706f3
Remove old assert_fails 2026-03-03 20:32:22 +01:00
3036d6d37e
Introduce --partial on assert_output 2026-03-03 20:29:39 +01:00
b57d527d6e
Introduce assert_output 2026-03-03 20:26:07 +01:00
f9d6696687
Introduce assert_failure 2026-03-03 20:23:39 +01:00
1a10b24b06
Introduce assert_success 2026-03-03 20:22:34 +01:00
5dbb6aea8f
Set up shfmt 2026-03-03 07:16:29 +01:00
a82e98d775
Move git-check-assertions to bin/ 2026-03-03 07:16:28 +01:00