Add CLI command to list Git-style references #1302
Open
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
Implements a new
icechunk ref listcommand that displays all branches and tags in an Icechunk repository, providing Git-style reference listing functionality from the CLI.Fixes #827
Motivation
Users need a convenient way to view all references (branches and tags) in their Icechunk repositories from the command line, similar to
git show-reforgit branch -a. Currently, this requires using the Python API, which is less convenient for quick repository inspection.Approach
This PR adds a new
refsubcommand to the Icechunk CLI with alistoperation that:snapshot listandconfig listRepository::list_branches()andRepository::list_tags()methods that are already available in the Rust codebaseChanges
Ref(RefCommand)variant to the CLICommandenumRefCommandenum withList(RefListCommand)subcommandref_list()handler function that:run_cli()executorTest Coverage
Added
test_ref_list()integration test that:feature) and tag (v1.0)Test passes with:
cargo test --lib --features cli cli::interface::tests::test_ref_listUsage
Testing
Manually tested with:
All existing CLI tests continue to pass.
🤖 Generated with Claude Code