mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-03 03:33:16 +03:00
fix local branch name serialization
This commit is contained in:
parent
6bb05f8cc9
commit
df098e8d57
@ -26,7 +26,7 @@ impl Name {
|
||||
|
||||
impl Serialize for Name {
|
||||
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
serializer.serialize_str(&self.branch)
|
||||
serializer.serialize_str(&self.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -339,12 +339,16 @@ pub async fn can_apply_virtual_branch(
|
||||
pub async fn can_apply_remote_branch(
|
||||
handle: AppHandle,
|
||||
project_id: &str,
|
||||
branch: git::BranchName,
|
||||
branch: &str,
|
||||
) -> Result<bool, Error> {
|
||||
let project_id = project_id.parse().map_err(|_| Error::UserError {
|
||||
code: Code::Projects,
|
||||
message: "Malformed project id".to_string(),
|
||||
})?;
|
||||
let branch = branch.parse().map_err(|_| Error::UserError {
|
||||
code: Code::Branches,
|
||||
message: "Malformed branch name".to_string(),
|
||||
})?;
|
||||
handle
|
||||
.state::<Controller>()
|
||||
.can_apply_remote_branch(&project_id, &branch)
|
||||
|
@ -90,7 +90,6 @@ export class RemoteBranch {
|
||||
sha!: string;
|
||||
name!: string;
|
||||
behind!: number;
|
||||
upstream?: string;
|
||||
@Type(() => RemoteCommit)
|
||||
commits!: RemoteCommit[];
|
||||
isMergeable!: Promise<boolean>;
|
||||
|
Loading…
Reference in New Issue
Block a user