1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 16:26:11 +00:00

Merge pull request #3093 from restic/fix-diff-metadata

diff: Correctly count top-level blobs
This commit is contained in:
rawtaz 2020-11-13 21:50:29 +01:00 committed by GitHub
commit e8713bc209
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -364,6 +364,8 @@ func runDiff(opts DiffOptions, gopts GlobalOptions, args []string) error {
} }
stats := NewDiffStats() stats := NewDiffStats()
stats.BlobsBefore.Insert(restic.BlobHandle{Type: restic.TreeBlob, ID: *sn1.Tree})
stats.BlobsAfter.Insert(restic.BlobHandle{Type: restic.TreeBlob, ID: *sn2.Tree})
err = c.diffTree(ctx, stats, "/", *sn1.Tree, *sn2.Tree) err = c.diffTree(ctx, stats, "/", *sn1.Tree, *sn2.Tree)
if err != nil { if err != nil {