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

repo: move new commit ids into RewriteType enum #3630

Merged
merged 2 commits into from
May 6, 2024
Merged

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

martinvonz added 2 commits May 6, 2024 09:06
Looks like I forgot this in some recent refactoring.

I don't really see any harm in making the type public later. I might
want to make `rebase_descendants()` not clear `parent_mapping` and
instead provide a way of accessing it afterwards (removing the need
for the `_return_map()` flavors).  We'll see if that ends up
happening. For now it can be private anyway.
`RewriteType::Rewritten` must have exactly one replacement. I think
it's better to encode that in the type by attaching the value to the
enum variant. I also renamed the type to just `Rewrite` since it now
has attached data and `Type` sounds like a traditional data-free enum
to me.
@martinvonz martinvonz force-pushed the push-zzkmlqnvrtpo branch from d265e23 to d66d685 Compare May 6, 2024 17:24
@martinvonz martinvonz merged commit 2e44741 into main May 6, 2024
16 checks passed
@martinvonz martinvonz deleted the push-zzkmlqnvrtpo branch May 6, 2024 19:58
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.

3 participants