-
Notifications
You must be signed in to change notification settings - Fork 706
Implement but branch new stacked branch #10477
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
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
When doing `but branch new <branchname>` you can also pass `--anchor <branch|commit>` or `-a <branch|commit>` to create a stacked branch
7fadd50
to
71902aa
Compare
Ok(()) | ||
} else { | ||
// Create an independent branch | ||
let req = gitbutler_branch::BranchCreateRequest { |
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.
That's interesting, I thought but_api::create_branch()
does the same, but using the new API.
pub fn create_branch( |
That's what the UI calls.
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.
Nice catch. This commit only had the but_api::virtual_branches::create_virtual_branch
so here I only added the create reference. But this should be updated indeed
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.
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.
Ah, right, I was confused. Somehow I thought there would only be one function for that, but in fact there are two, this one and the one I mentioned, and both are used by the UI for some reason :). Both support ws3
and will call the respective new function, so there is no issue with it - probably this one has better
This is probably where one would apply another fix then.
I also think what I was responding to here is to generally avoid calling anything with virtual
in it 😅.
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.
I opened #10492 for this, with the kind request to validate it as I didn't do that
When doing
but branch new <branchname>
you can also pass
--anchor <branch|commit>
or-a <branch|commit>
tocreate a stacked branch