Skip to content

Fix get to allow --objects 0 (per README)#433

Merged
harshavardhana merged 1 commit intominio:masterfrom
dbishop:fix-get-list-existing-and-objects-zero
Nov 20, 2025
Merged

Fix get to allow --objects 0 (per README)#433
harshavardhana merged 1 commit intominio:masterfrom
dbishop:fix-get-list-existing-and-objects-zero

Conversation

@dbishop
Copy link
Contributor

@dbishop dbishop commented Nov 20, 2025

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

This fix allows --objects 0 with --list-existing while ensuring the object count is >= 1 without --list-existing and still not negative when --list-existing is supplied.

Motivation and Context

Using `--list-existing` will list at most `--objects` from the
bucket and download them instead of uploading random objects
(set it to 0 to use all object from the listing).

The intent of --objects with --list-existing for the "get" command was for the special value 0 to represent "list all and use all". This is correctly implemented for "delete" but "get" was disallowing this combination.

How to test this PR?

Ensure there's some objects in the specified bucket and run "warp get" with --list-existing and --objects 0.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (9e01ed3)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

    Using `--list-existing` will list at most `--objects` from the
    bucket and download them instead of uploading random objects
    (set it to 0 to use all object from the listing).

The intent of --objects with --list-existing for the "get" command was
for the special value 0 to represent "list all and use all".  This is
correctly implemented for "delete" but "get" was disallowing this
combination.

This fix allows --objects 0 with --list-existing while ensuring the
object count is >= 1 without --list-existing and still not negative when
--list-existing is supplied.
@harshavardhana harshavardhana merged commit cedff9d into minio:master Nov 20, 2025
6 checks passed
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.

3 participants