create: support --stats with --dry-run - #10105
Merged
ThomasWaldmann merged 1 commit intoAug 15, 2026
Merged
Conversation
A dry run already walks the files and stats them, so it can cheaply count the files and sum up their sizes from file system metadata, without reading any file contents. --stats (and --json) with --dry-run now report the number of files and the original size. The deduplicated size is unknown in a dry run, as data is not read, chunked, and deduplicated. The sizes of data read from stdin, from a command's output, and from special files are also unknown in a dry run and counted as zero. Hardlinks count once per link, as in a real create. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10105 +/- ##
==========================================
- Coverage 87.01% 86.98% -0.03%
==========================================
Files 99 100 +1
Lines 17615 17684 +69
Branches 2664 2674 +10
==========================================
+ Hits 15327 15382 +55
- Misses 1593 1606 +13
- Partials 695 696 +1 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1648, fixes #4131.
--stats(and--json) now work together with--dry-runforborg create.A dry run already walks all files and
stat()s them, so it can cheaply count the files and sum up their sizes from file system metadata, without reading any file contents — the dry run stays as fast as before.Text output:
--jsonreturns"dry_run": trueand a reducedstatsobject (nfiles,original_size) instead of thearchiveobject (documented infrontends.rst).Notes on the numbers:
--content-from-command), and from special files (--read-special) are unknown and counted as zero.🤖 Generated with Claude Code