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

Make MutableRepo::parent_mapping private by moving code onto the type #3507

Merged
merged 6 commits into from
Apr 15, 2024

Conversation

martinvonz
Copy link
Member

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

I rewrote `old_target` and `new_target` to more accurately represent
the change; the old target should be a normal (singleton) ref.
With this change, `update_all_references()` only uses `self` to get to
`mut_repo`. I'll move the function onto `MutableRepo` next.
I think the recent refactorings (especially 9c382fd) make it
pretty clear that `DescendantRebaser` will not attempt to rebase the
same commit twice, so I think we can remove the assertions. This
removes some of the places where `DescendantRebaser` reaches into
`MutableRepo`'s internals.
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

Nice.

lib/src/repo.rs Show resolved Hide resolved
The functions now depend only on `MutableRepo`, so I think they belong
on that type. This gets us closer to being able to make
`parent_mapping` private again.
This lets us make `parent_mapping` private again.
@martinvonz martinvonz enabled auto-merge (rebase) April 15, 2024 14:01
@martinvonz martinvonz merged commit 0bbebaf into main Apr 15, 2024
16 checks passed
@martinvonz martinvonz deleted the push-xqwoyputpukr branch April 15, 2024 14:09
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