Skip to content

tool_cb_wrt: try up to .9999 when no-clobbering - #22784

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/clobber-999
Closed

bagder wants to merge 2 commits into
masterfrom
bagder/clobber-999

Conversation

@bagder

@bagder bagder commented Sep 1, 2026

Copy link
Copy Markdown
Member

Previously it gave up after 100.

Some users use this feature when downloading large number of files in a glob range and then 100 is on the small side.

Previously it gave up after 100.

Some users use this feature when downloading large number of files in a
glob range and then 100 is on the small side.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Expands --no-clobber filename suffix attempts beyond the previous limit.

Changes:

  • Raises the suffix limit to 9999.
  • Updates option documentation accordingly.
File summaries
File Description
src/tool_cb_wrt.c Expands numbered filename retries.
docs/cmdline-opts/no-clobber.md Documents the new limit.
Review details

Suppressed comments (1)

src/tool_cb_wrt.c:73

  • The strict comparison makes the documented final suffix unreachable: next_num starts at 1 and is formatted before incrementing, so the last attempted name is .9998. Use an inclusive bound so .9999 is actually tried as promised by the option documentation and PR title.
            (next_num < MAX_CLOBBER_ATTEMPTS)) {
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tool_cb_wrt.c
@github-actions github-actions Bot added the tests label Sep 1, 2026
@bagder
bagder marked this pull request as ready for review September 1, 2026 16:09
@bagder bagder closed this in 30107ba Sep 3, 2026
@bagder
bagder deleted the bagder/clobber-999 branch September 3, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants