Skip to content

feat(git): add grouped commit integration opt-out - #248

Merged
dpc merged 1 commit into
masterfrom
dpc/jj-vtllymzyyzun
Jul 25, 2026
Merged

feat(git): add grouped commit integration opt-out#248
dpc merged 1 commit into
masterfrom
dpc/jj-vtllymzyyzun

Conversation

@dpc

@dpc dpc commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Posted by Tau

Summary

Add git.enable, a default-true umbrella option for disabling all Flakebox commit-time Git integration without configuring three separate partial options.

Details

With git.enable = false, Flakebox does not generate or install pre-commit or commit-msg, generate/configure the commit template, include the hook timer package, or generate Just/GitHub consumers of the absent pre-commit hook. Existing git.pre-commit.enable, git.commit-msg.enable, and git.commit-template.enable options retain granular behavior when the umbrella is enabled.

The option prevents future generated/activated state but intentionally does not delete prior local state. Documentation gives ownership-aware manual cleanup commands for additive generated files, Git common-directory hooks, and only the known Flakebox commit.template value.

Generated behavior tests cover default-enabled output, umbrella-disabled output, all granular artifact combinations, activation commands, packages, and Just/GitHub consumers.

### Summary

Add a default-enabled `git.enable` umbrella so projects can disable all Flakebox commit-time Git integration with one option. When disabled, Flakebox omits generated pre-commit and commit-msg hooks, the commit template, their shell activation/configuration, the pre-commit timer package, and generated Just/GitHub consumers of the absent hook. Preserve the existing granular options for partial control.

### Details

Gate the three existing generation and activation branches with `git.enable` while leaving contributed check configuration and each partial enable option unchanged. Gate the Just lint recipe/final-check dependency and GitHub CI lint job on effective pre-commit enablement, including the existing granular pre-commit option. This prevents future Flakebox generation, hook installation, template configuration, and dangling consumers without adding stale-state manifests or automatic deletion.

Document manual cleanup of additive generated files, hooks under Git’s common directory after ownership confirmation, and the template setting only when it still equals Flakebox’s value. Add evaluation assertions for defaults, retained partial values, and package omission. Generated checks cover positive default artifacts/actions/consumers, umbrella-disabled output, and each granular artifact combination.

### Reviews

An independent maintainability review initially found dangling Just/GitHub pre-commit consumers, incomplete default/granular coverage, and unsafe/incomplete manual cleanup documentation. The implementation gated consumers on effective pre-commit enablement, expanded generated-behavior coverage, and made cleanup instructions ownership- and value-aware. Follow-up review passed.

### Validation

- `nix develop -c treefmt`
- focused `gitHooks` Nix check
- `nix develop -c selfci check`
- `nix develop -c selfci check --candidate vtllymzy`
@dpc
dpc marked this pull request as ready for review July 25, 2026 00:01
@dpc
dpc merged commit 8c53d26 into master Jul 25, 2026
4 checks passed
@dpc
dpc deleted the dpc/jj-vtllymzyyzun branch July 25, 2026 00:01
dpc added a commit to dpc/flakebox that referenced this pull request Jul 30, 2026
feat(git): add grouped commit integration opt-out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant