Repository navigation
Closed
Milestone
Description
Problem
Files like yarn.lock, package-lock.json, Cargo.lock, etc. can be extremely large and their diffs are not meaningful for human review. Currently, these files are processed the same as source code, which can:
- Slow down the animation significantly
- Consume excessive memory
- Provide no useful information (diffs are auto-generated)
Proposed Solution
Exclude certain file patterns from diff animation, similar to how binary files are currently handled.
Files to Exclude
- Lock files:
yarn.lock,package-lock.json,pnpm-lock.yaml,Cargo.lock,Gemfile.lock,poetry.lock,composer.lock - Generated files:
*.min.js,*.min.css, bundle files - Large data files:
*.sql, database dumps - Vendored dependencies:
vendor/,node_modules/(if somehow included in diffs)
Implementation Options
Option 1: Hardcoded exclusion list
const EXCLUDED_FILES: &[&str] = &[
"yarn.lock",
"package-lock.json",
"pnpm-lock.yaml",
"Cargo.lock",
"Gemfile.lock",
"poetry.lock",
"composer.lock",
];
fn should_exclude_file(path: &str) -> bool {
let filename = path.rsplit('/').next().unwrap_or(path);
EXCLUDED_FILES.contains(&filename)
}Option 2: Pattern-based exclusion
const EXCLUDED_PATTERNS: &[&str] = &[
"*.lock",
"*.min.js",
"*.min.css",
"*-lock.json",
"*-lock.yaml",
];Option 3: Configuration file
Allow users to configure exclusions in .gitlogue.toml:
[exclude]
files = ["yarn.lock", "package-lock.json"]
patterns = ["*.min.js", "*.min.css"]Display Behavior
When an excluded file is encountered:
- Show a single line:
📦 package-lock.json (skipped - generated file) - Continue to next file immediately
- No line-by-line animation
Acceptance Criteria
- Lock files are automatically excluded from diff animation
- Excluded files show a brief skip message
- Performance improves for commits with large lock file changes
- Users can understand why a file was skipped
- (Optional) Users can configure additional exclusions
Related
- Similar to binary file handling
- Improves performance for typical development workflows
Metadata
Metadata
Assignees
Labels
No labels
Activity
linear commentedon Nov 9, 2025
E-670