jj/lib
Lucio Franco d9f2772988
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
cli: add jj file track --include-ignored flag
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
2025-11-14 03:14:37 +00:00
..
benches cli, lib: move to Rust 2024 language edition 2025-07-28 17:05:41 +00:00
gen-protos protos: rename op_store to simple_op_store 2025-08-14 14:15:17 +00:00
proc-macros cli, lib: move to Rust 2024 language edition 2025-07-28 17:05:41 +00:00
src cli: add jj file track --include-ignored flag 2025-11-14 03:14:37 +00:00
tests testutils: dump_tree: print contents of conflicted trees 2025-11-09 17:48:25 +00:00
testutils cli: add jj file track --include-ignored flag 2025-11-14 03:14:37 +00:00
Cargo.toml backend: remove unused TreeValue::Conflict and read/write methods 2025-09-04 16:26:44 +00:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00