From 5bdb5658848ded93725a6e2fe8374653b783c713 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Sun, 10 Nov 2024 12:40:34 +0100 Subject: [PATCH] Fix serialization bug: alias StackBranch head to target --- crates/gitbutler-stack/src/stack_branch.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/gitbutler-stack/src/stack_branch.rs b/crates/gitbutler-stack/src/stack_branch.rs index db67cdfcf..be11024ed 100644 --- a/crates/gitbutler-stack/src/stack_branch.rs +++ b/crates/gitbutler-stack/src/stack_branch.rs @@ -16,6 +16,7 @@ use crate::{commit_by_oid_or_change_id, Stack, VirtualBranchesHandle}; #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct StackBranch { /// The target of the reference - this can be a commit or a change that points to a commit. + #[serde(alias = "target")] pub head: CommitOrChangeId, /// The name of the reference e.g. `master` or `feature/branch`. This should **NOT** include the `refs/heads/` prefix. /// The name must be unique within the repository.