Skip to content

fix(copy): Remove some redundant text in the beegfs copy usage message - #357

Open
Willard84 wants to merge 1 commit into
mainfrom
fix/323-copy-usage-defvalue
Open

Willard84 wants to merge 1 commit into
mainfrom
fix/323-copy-usage-defvalue

Conversation

@Willard84

Copy link
Copy Markdown
Contributor

What does this PR do / why do we need it?

beegfs copy --help showed the default value for --chunksize and --partition-threshold twice: once in the flag's own description text, once via pflag's auto-generated (default N) suffix. Suppresses the redundant suffix by setting each flag's DefValue to "0", which trips pflag's existing defaultIsZeroValue() check (see spf13/pflag's flag.go) that skips printing (default N) when the default is the type's zero value. The actual bound default (128MB / 1024MB) is unaffected -- DefValue is a display-only string, separate from the flag's real value.

Follows the same pattern already used in ctl/internal/cmd/rst/pushpull.go for PriorityFlag.

Verified: built and ran beegfs copy --help -- output now shows only the explicit "Default chunk size: 128 MB." text, no more duplicate (default 128). Confirmed via gofmt and go build/go vet (GOOS=linux) that nothing else broke.

Related Issue(s)

#323

Where should the reviewer(s) start reviewing this?

Single 5-line change in ctl/internal/cmd/copy/copy.go.

Are there any specific topics we should discuss before merging?

Not required.

What are the next steps after this PR?

Not required.

Checklist before merging:

  • Documentation: no developer or user documentation changes needed beyond the usage message itself (which this PR fixes).
  • Testing: cosmetic help-text change; no new tests needed.
  • Git Hygiene: single commit, Conventional Commits format.

#323)

We have the default values in beegfs-copy for chunksize and partition threshold explicitly in the text, so don't show the (Default XYZ) text as well
@Willard84
Willard84 requested a review from a team as a code owner July 21, 2026 23:55
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