-
Notifications
You must be signed in to change notification settings - Fork 34
Allow specifying the branching point even for trunk parents #621
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
Conversation
Current Aviator status
This PR was merged using Aviator. Stack
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
✅ FlexReview StatusCommon Owner:
Review SLO: |
Summary of ChangesHello @draftcode, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant refinement to how branch metadata is managed, specifically by allowing the explicit tracking of a Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request primarily refactors the codebase by renaming the Head field in BranchState to BranchingPointCommitHash for better clarity, and updates all its usages accordingly. This is a welcome change for maintainability. The PR also aims to relax the branch metadata semantics to allow specifying a branching point even for trunk parents, which is a useful enhancement for handling partially merged stacks, especially for the av adopt --remote flow. I have one point of feedback regarding the implementation of this new semantic, which I've detailed in a specific comment.
This relax the semantics of the branch metadata. In the branch metadata, we track `trunk: bool` and `head: string`, but only one of them could be specified in the current semantics. This update allows them to specify both. That is, even if the parent branch is a trunk branch, a branch metadata can specify the branching point. Accordingly, we update the internal name of that branching point as BranchingPointCommitHash. Newly added av branch --remote motivates this change. In that command, we might see a partially merged stack. In that case, we will have a case where a topic branch would have a trunk branch as a parent (because its original parent has been merged), but at the same time, such topic branches would need to have an explicit branching point in order to avoid already merged commits to be considered as a part of that topic branch. Behavior updates would be necessary in the sequencer, but we will do that in the following PRs.
047eb15 to
55a6700
Compare
This relax the semantics of the branch metadata. In the branch metadata,
we track
trunk: boolandhead: string, but only one of them could bespecified in the current semantics. This update allows them to specify
both. That is, even if the parent branch is a trunk branch, a branch
metadata can specify the branching point. Accordingly, we update the
internal name of that branching point as BranchingPointCommitHash.
Newly added av branch --remote motivates this change. In that command,
we might see a partially merged stack. In that case, we will have a case
where a topic branch would have a trunk branch as a parent (because its
original parent has been merged), but at the same time, such topic
branches would need to have an explicit branching point in order to
avoid already merged commits to be considered as a part of that topic
branch.
Behavior updates would be necessary in the sequencer, but we will do
that in the following PRs.