Skip to content
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

rewrite: deduplicate parent ids per remap iteration #4353

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

yuja
Copy link
Collaborator

@yuja yuja commented Aug 28, 2024

#4352

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

This is basically a DFS to find leaf nodes. It will help omit duplicated
parent ids early.
If merge-heavy history was abandoned, intermediate parent chains can have tons
of duplicates, and the process explodes soon. Instead, we can skip any parent
ids that have been remapped.

We can no longer detect cycles reliably, but I think that's okay so long as
the function terminates.

Fixes martinvonz#4352
Copy link
Owner

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

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

Thanks!

lib/src/repo.rs Outdated Show resolved Hide resolved
@yuja yuja merged commit d99a850 into martinvonz:main Aug 28, 2024
18 checks passed
@yuja yuja deleted the push-zkmyvxlksyly branch August 28, 2024 23:59
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