Skip to content

put: skip uploads when destination contents match - #399

Merged
AndreyVMarkelov merged 1 commit into
dropbox:masterfrom
AndreyVMarkelov:andreymarkelov/put-skip-same
Nov 11, 2026
Merged

AndreyVMarkelov merged 1 commit into
dropbox:masterfrom
AndreyVMarkelov:andreymarkelov/put-skip-same

Conversation

@AndreyVMarkelov

Copy link
Copy Markdown
Contributor

Adds put --if-exists skip-same: upload missing files, skip identical files, and return a path conflict when contents differ or the remote content hash is unavailable. Rerunning dbxcli put report.txt /report.txt --if-exists skip-same skips an unchanged file without transferring its contents.

Uses the existing SDK contenthash.Compute and checks size before hashing. Supports single files, recursive uploads, and stdin; missing destinations use strict add mode to prevent overwriting concurrently created files. Updates JSON help/manifest enums, the public JSON schema, and generated command documentation. Dry-run retains its existing planning behavior without comparing contents. Comparison uses the fetched metadata snapshot and is not atomic with concurrent file changes.

Validation:

  • go test ./...
  • go vet ./...
  • go build ./...
  • Regenerated docs and JSON schemas; confirmed a second generation produces no changes.
  • Live Dropbox E2E: missing/identical files, unchanged revision after skip, differing hashes/sizes with remote contents preserved, empty files, stdin, recursive mixed uploads, dry-run, and a 33 MiB session upload followed by a skip. All temporary remote test directories were removed.

Fixes #129.

@AndreyVMarkelov
AndreyVMarkelov merged commit 5094875 into dropbox:master Nov 11, 2026
14 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.

Does dbxcli skip transferring files if they are unmodified?

1 participant