Skip to content

index: port to modern Go iterators#5560

Merged
MichaelEischer merged 3 commits into
restic:masterfrom
MichaelEischer:index-iterators
Nov 16, 2025
Merged

index: port to modern Go iterators#5560
MichaelEischer merged 3 commits into
restic:masterfrom
MichaelEischer:index-iterators

Conversation

@MichaelEischer

@MichaelEischer MichaelEischer commented Oct 12, 2025

Copy link
Copy Markdown
Member

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

Convert MasterIndex, Index and AssociatedSet to use modern Go iterators. I've kept the Repository interface unchanged for now. The change was originally intended to allow removing the packs argument from repository.Repack. However, to not negatively affect Prune, this requires more work than I currently want to spend. Thus, this PR only contains the independently useful index refactorings.

Refactoring made using Cursor AI.

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

No.

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 marked this pull request as ready for review October 12, 2025 17:04

@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 merged commit 14f3bc8 into restic:master Nov 16, 2025
12 checks passed
@MichaelEischer MichaelEischer deleted the index-iterators branch November 16, 2025 12:24
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.

1 participant