Update snapshot summary on rewrite#4905
Conversation
fd5a092 to
0a2220c
Compare
MichaelEischer
left a comment
There was a problem hiding this comment.
Thanks for giving this a try. Recalculating the snapshot size is definitely useful. However, the calculation itself does not belong into cmd_rewrite.go, see comments below for more details.
a9b9561 to
2874f8f
Compare
|
@MichaelEischer : Thanks for the feedback! Updated the PR to make the change to the summary only if it's non-nil and moved the update to the |
2874f8f to
d9fc775
Compare
34783a8 to
b0905a4
Compare
MichaelEischer
left a comment
There was a problem hiding this comment.
Thanks for the changes so far. I have only a few small nitpicks left, see below.
I'd also like to have a minimal functionality test in cmd/restic/cmd_rewrite_integration_test.go, maybe by extending TestRewriteReplace to check the snapshot's stats before and after rewriting. I can take care of that if you want.
316c380 to
210c2e9
Compare
0a7b905 to
1259449
Compare
Signed-off-by: Alex Johnson <hello@alex-johnson.net>
1259449 to
3bf2927
Compare
What does this PR change? What problem does it solve?
The snapshot summary doesn't reflect the files that are tracked after a rewrite
Was the change previously discussed in an issue or on the forum?
Fixes #4902
Checklist
changelog/unreleased/that describes the changes for our users (see template).gofmton the code in all commits.