From 4901afc59a43841a7cd9e5aee5fbdbd5966a8171 Mon Sep 17 00:00:00 2001 From: gbc dev Date: Sat, 18 Jul 2026 20:57:37 +0200 Subject: 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 --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') 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) -- cgit v1.3.1-sl0p