Add --dry-run option to object get, put, and sync commands#2865
Add --dry-run option to object get, put, and sync commands#2865
Conversation
|
@copilot - continue your work. |
Addressed all review comments in commit 85a1404:
The dry-run mode now performs zero filesystem operations while still providing clear, structured output that users can grep/parse. |
Completed work in commit ea13c1c:
The dry-run implementation is complete and tested. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
f7e5aa9 to
4505494
Compare
4505494 to
05bc64e
Compare
7c4a359 to
82cb1be
Compare
eed4095 to
3fcb51f
Compare
Users need to preview transfer operations before executing them, particularly when dealing with large numbers of objects where path interpretation errors could be costly to reverse.
Implementation
Client library (
client/handle_http.go)WithDryRun()transfer option following existing option patterndryRunflag throughTransferClient→TransferJob→ transfer operationsdownloadObject()anduploadObject()to perform zero filesystem operations in dry-run modeDOWNLOAD: source -> destinationorUPLOAD: source -> destinationCLI (
cmd/object_{get,put,sync}.go)--dry-runflag to all three commandsclient.WithDryRun(dryRun)transfer optionTests (
cmd/object_dryrun_test.go)--dry-runflag exists for all object commandsUsage
Behavior
Dry-run mode performs full path resolution and metadata discovery but skips all file operations:
Example output:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.