Skip to content

snapshots: correctly handle --latest in combination with --group-by#5601

Merged
MichaelEischer merged 1 commit into
restic:masterfrom
MichaelEischer:snapshots-fix-groupby-with-latest
Nov 17, 2025
Merged

snapshots: correctly handle --latest in combination with --group-by#5601
MichaelEischer merged 1 commit into
restic:masterfrom
MichaelEischer:snapshots-fix-groupby-with-latest

Conversation

@MichaelEischer

Copy link
Copy Markdown
Member

What does this PR change? What problem does it solve?

The code computing --latest 1 for the snapshot command always internally grouped snapshots. However, this grouping by now already happens outside FilterLatestSnapshots. Remove the old code and add a regression test.

Was the change previously discussed in an issue or on the forum?

Fixes #5586

Checklist

  • I have added tests for all code changes.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichaelEischer MichaelEischer force-pushed the snapshots-fix-groupby-with-latest branch from 4f3db24 to 5afe615 Compare November 17, 2025 21:27
@MichaelEischer MichaelEischer merged commit 8767549 into restic:master Nov 17, 2025
12 checks passed
@MichaelEischer MichaelEischer deleted the snapshots-fix-groupby-with-latest branch November 17, 2025 21:50
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.

Inconsistency between snapshots and forget with respect to --group-by

1 participant