mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
This adds support for tracking ignored and oversized files with `jj file track`. Previously, `jj file track` would silently fail to track files that were ignored by `.gitignore` or larger than `snapshot.max-new-file-size`. This commit introduces an `--include-ignored` flag that allows users to explicitly track these files. ## Implementation Added a `force_tracking_matcher` field to `SnapshotOptions` that overrides ignore rules and size limits. When `--include-ignored` is specified, the file pattern matcher is passed as `force_tracking_matcher`, allowing three checks in `FileSnapshotter` to bypass their usual restrictions for directory ignores, file ignores, and file size limits. ## Tests - `test_track_ignored_with_flag`: Verifies `.gitignore`d files can be tracked - `test_track_large_file_with_flag`: Verifies oversized files can be tracked - `test_track_ignored_directory`: Verifies ignored directories can be tracked recursively # Checklist If applicable: - [ ] I have updated `CHANGELOG.md` - [x] I have updated the documentation (`README.md`, `docs/`, `demos/`) - [ ] I have updated the config schema (`cli/src/config-schema.json`) - [x] I have added/updated tests to cover my changes |
||
|---|---|---|
| .. | ||
| git.rs | ||
| lib.rs | ||
| proptest.rs | ||
| test_backend.rs | ||