feat: barretenberg PR migrate tool #1193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Originally this was going to be a short video, then I hit edge cases. I went for a script. Hopefully I can do a video in a bit explaining what is needed to know to understand this, but after this it should be a one liner:
./scripts/migrate_barretenberg_branch.sh <barretenberg-branch> "<commit-message>"
There is a fair bit of error handling and recovery advice as this is a cross-repo stitching and thus edge-case prone.
I hit one big gotcha here that is worked around with any such operation briefly doing a
git rm <folder>
, and git rm updating .gitmodules surprisingly. This gets rid of this diff, which is 'expected' when git submodules interact with git subrepo.Also it tosses away the .gitrepo changes, as those we only want if pulling from barretenberg master, not PRs (which will go in as aztec commits).
Checklist: