Skip to content

Do not skip root tree when searching for trees#5153

Merged
MichaelEischer merged 4 commits intorestic:masterfrom
albinvass:fix-restic-find-tree
Jan 13, 2025
Merged

Do not skip root tree when searching for trees#5153
MichaelEischer merged 4 commits intorestic:masterfrom
albinvass:fix-restic-find-tree

Conversation

@albinvass
Copy link
Copy Markdown

@albinvass albinvass commented Nov 26, 2024

This fixes an issue where restic cannot find the tree when trying to find the tree id of a snapshot.

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

restic find --tree <id> cannot find the tree referenced by restic snapshot --json since it skips the root tree when searching.

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

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.

@albinvass albinvass force-pushed the fix-restic-find-tree branch from b5e3b5f to d050c28 Compare November 27, 2024 12:37
Albin Vass added 2 commits November 28, 2024 10:28
This fixes an issue where restic cannot find the tree when trying to find the
tree id of a snapshot.
@albinvass albinvass force-pushed the fix-restic-find-tree branch from d050c28 to afdeece Compare November 28, 2024 09:28
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@MichaelEischer MichaelEischer enabled auto-merge (squash) December 9, 2024 20:51
@MichaelEischer
Copy link
Copy Markdown
Member

The linter is still unhappy:

cmd/restic/cmd_find_integration_test.go:94: File is not gofmt-ed with -s (gofmt)

@MichaelEischer MichaelEischer enabled auto-merge (squash) January 13, 2025 21:01
@MichaelEischer MichaelEischer merged commit 5bf0204 into restic:master Jan 13, 2025
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.

2 participants