Draft
feat: zstash ls --tars filters to tars containing matched files#457
Conversation
Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com>
When `--tars` is used with a file glob, only the tars containing the matched files are shown, making it easy to identify the subset of archives needed for a partial download. - Modified `ls_tars_database` to accept an optional `tar_names` list; when provided it filters the SQL query to those names - `ls()` extracts unique tar names from matched `FilesRow` results and passes them to `ls_tars_database` - Added unit tests in `tests/unit/test_ls.py` - Updated documentation with a filtering example Co-authored-by: forsyth2 <30700190+forsyth2@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
forsyth2
August 21, 2026 17:49
View session
Collaborator
|
Alternative approach that doesn't involve |
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
Previously
zstash ls --tarsalways dumped every tar in the archive regardless of any file filter. Users wanting to download a subset of the archive (e.g. "years 1850–1900 from the historical run") had no way to identify which specific tars they needed.Objectives:
--tarsshow only the tars that contain the files matched by the[files]glob patternSelect one: This pull request is...
Small Change