aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorgbc dev <gbc@localhost>2026-07-18 20:57:37 +0200
committergbc dev <gbc@localhost>2026-07-18 20:57:37 +0200
commit4901afc59a43841a7cd9e5aee5fbdbd5966a8171 (patch)
treece5fe093e2896cf583ae0fbec123b3999777f8d4 /README.md
parentREADME: fix source paths in Architecture table (src/ prefix) (diff)
downloadsl0pboy-4901afc59a43841a7cd9e5aee5fbdbd5966a8171.tar.gz
sl0pboy-4901afc59a43841a7cd9e5aee5fbdbd5966a8171.tar.xz
sl0pboy-4901afc59a43841a7cd9e5aee5fbdbd5966a8171.zip
hooks: clang-format pre-commit (changed lines only) + .clang-format
git-clang-format scopes formatting to the lines each commit touches - a full-file reformat would destroy the deliberately dense hand formatting (opcode tables, multi-statement helpers). The hook re-adds formatted files (git-clang-format --staged fixes the worktree, not the index) and refuses partially-staged C files rather than mixing staged and unstaged changes. Enable once: git config core.hooksPath hooks
Diffstat (limited to 'README.md')
-rw-r--r--README.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/README.md b/README.md
index 150e842..d53f728 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ Resize the terminal and `SIGWINCH` triggers a full repaint.
## Build & run
```sh
+git config core.hooksPath hooks # once: clang-format pre-commit hook
make
./build/sl0pboy path/to/rom.gb # just play it (ROM goes last)
./build/sl0pboy --test 30 rom.gb # run 30s, serial -> stderr (test roms)