Skip to content

Conversation

krlvi
Copy link
Member

@krlvi krlvi commented Sep 28, 2025

When doing but branch new <branchname>
you can also pass --anchor <branch|commit> or -a <branch|commit> to
create a stacked branch

Copy link

vercel bot commented Sep 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
gitbutler-web Ignored Ignored Preview Sep 28, 2025 5:03pm

@github-actions github-actions bot added the rust Pull requests that update Rust code label Sep 28, 2025
@krlvi krlvi enabled auto-merge September 28, 2025 16:39
When doing `but branch new <branchname>`
you can also pass `--anchor <branch|commit>` or `-a <branch|commit>` to 
create a stacked branch
@krlvi krlvi force-pushed the kv-branch-58 branch 2 times, most recently from 7fadd50 to 71902aa Compare September 28, 2025 17:02
@krlvi krlvi merged commit 8186196 into master Sep 28, 2025
21 checks passed
@krlvi krlvi deleted the kv-branch-58 branch September 28, 2025 17:13
Ok(())
} else {
// Create an independent branch
let req = gitbutler_branch::BranchCreateRequest {
Copy link
Collaborator

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.

Copy link
Member Author

@krlvi krlvi Sep 28, 2025

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm the frontend still does the create_virtual_branch command so this just does the same
Maybe it should be updated in both places....
image

Copy link
Collaborator

@Byron Byron Sep 29, 2025

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 😅.

Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants