Merge pull request #1506 from gitbutlerapp/create-virtual-branch-reference

Create virtual branch reference
This commit is contained in:
Nikita Galaiko 2023-11-03 13:30:44 +01:00 committed by GitHub
commit 7480ac20be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -604,5 +604,11 @@ pub fn create_virtual_branch_from_branch(
let writer = branch::Writer::new(gb_repository);
writer.write(&branch).context("failed to write branch")?;
project_repository
.git_repository
.reference(&branch.refname(), branch.head, false, "new vbranch")
.context("failed to create branch reference")?;
Ok(branch)
}