Skip to content

fix(get): accurate error when a glob excludes all tracked files under a path#263

Open
CGMossa wants to merge 1 commit into
mainfrom
fix/get-glob-error-message
Open

fix(get): accurate error when a glob excludes all tracked files under a path#263
CGMossa wants to merge 1 commit into
mainfrom
fix/get-glob-error-message

Conversation

@CGMossa

@CGMossa CGMossa commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

TODO: replace this line with your own framing, in your own voice.

AI-written details

Summary

  • resolve_paths_for_get reported "The following paths are not tracked by DVS" for every explicit path that matched no tracked file, even when the path has tracked files and the provided glob merely excluded all of them (e.g. dvs get data/ --glob '*.parquet' where data/ holds only tracked CSVs).
  • When a glob is provided and a path matches nothing, the path is now re-checked without the glob. If tracked files exist under it, the error reads "The following paths have no tracked files matching glob ''". Otherwise the existing "not tracked by DVS" message stands.
  • Mixed failures list each path under the correct heading. Both cases still refuse the whole batch, exactly as before.
  • specs.md: the Globbing section now states that explicit file paths bypass the glob in add, get, and status. The get section documents the glob-excluded error variant.
  • Scope: only resolve_paths_for_get in dvs/src/globbing.rs. PathFilter::matches, resolve_paths_for_add, get.rs, and add.rs are untouched.

Test plan

  • cargo test -p dvs (81 passed, includes three new tests: glob excludes everything, untracked path with glob, mixed failure with both headings)
  • cargo clippy -p dvs --all-targets (no warnings)
  • cargo fmt --check
  • Manual CLI check: tracked dir + excluding glob names the glob, untracked path + glob still says "not tracked", mixed run shows both headings, explicit file still bypasses the glob (all exit 1 except the bypass case)

Notes


Drafted by Claude (claude-fable-5). Reviewed by the author.

… a path

resolve_paths_for_get reported "not tracked by DVS" for every explicit
path that matched no tracked file, even when the path has tracked files
and the provided glob merely excluded all of them. Re-check such paths
without the glob and report them under a distinct message naming the
glob pattern. Mixed failures list each path under the correct heading.
Both cases still refuse the whole batch.

Spec: state that explicit file paths bypass the glob in add, get, and
status, and document the glob-excluded error variant for get.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CGMossa
CGMossa force-pushed the fix/get-glob-error-message branch from fe809d5 to 889589c Compare July 16, 2026 08:32
@CGMossa

CGMossa commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

This is related to #277. So we have to think about where this makes the most sense to add ignored paths.

@CGMossa

CGMossa commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

TODO: replace this line with your own framing, in your own voice.

AI-written details: orthogonal to #277, composes cleanly with it, where ignored paths should live

Summary

Notes


Drafted by Claude (claude-fable-5). Reviewed by the author.

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