-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json forget #2185
Json forget #2185
Conversation
This adds a test of the json output of the forget command, by running it once, asking it to keep one snapshot, and verifying that the output has the right number of snapshots listed in the Keep and Remove fields of the result.
Codecov Report
@@ Coverage Diff @@
## master #2185 +/- ##
========================================
- Coverage 50.76% 46.77% -4%
========================================
Files 176 176
Lines 14251 14276 +25
========================================
- Hits 7234 6677 -557
- Misses 5964 6582 +618
+ Partials 1053 1017 -36
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great already, thanks for your contribution! It'd be nice if you could also integrate the reasons each snapshot is kept (which is part of the normal output, but not included in the JSON output yet). Would you like to do that in this PR? Or open a new PR later on?
This dumps the reasons as well as the list of keeps and removes with the output from the forget command.
This includes the reasons, although this is kind of simplistic in that it just dumps the reasons out. Does it seem useful this way, or should I try to correlate each reason with each keep and remove? |
Awesome, thanks! looks good! |
What is the purpose of this change? What does it change?
This makes the
--json
option work with theforget
command.Was the change discussed in an issue or in the forum before?
I created issue #2184 to describe this.
Closes #2184
Checklist
(it could be argued that this is already described in the manual)
changelog/unreleased/
that describes the changes for our users (template here)gofmt
on the code in all commits