feat: add .cmtignore support for excluding files from LLM analysis#29
Merged
feat: add .cmtignore support for excluding files from LLM analysis#29
Conversation
Large generated files (migrations, schemas, etc.) can overwhelm the LLM context window. This adds a .cmtignore file (glob patterns) to permanently exclude files from commit message generation, plus a max_file_lines threshold (default 5000) that prompts users to add oversized files. Files in .cmtignore are still committed normally — they're only skipped for LLM analysis. Skipped/ignored files display dimmed with a ~ marker in the staged files summary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update indentation and line breaks in src/git.rs and src/cmtignore.rs - Improve readability of test assertions and complex format! macros - Ensure consistent code style across the project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.cmtignorefile support (glob patterns) to permanently exclude files from commit message generation, useful for large generated files like migrations and schemasmax_file_linesthreshold (default 5000) that detects oversized files and prompts users to add them to.cmtignore~markers for skipped/ignored files.cmtignoreare still committed normally — only skipped for LLM analysisTest plan
.cmtignorepattern matching (exact, single glob, double glob)load_cmtignore/append_to_cmtignorefile operationsmax_file_linesthreshold filtering and zero-disables behaviorget_staged_changes.cmtignorein a repo and verify files are excluded from LLM diff🤖 Generated with Claude Code