Fix serialization bug: alias StackBranch head to target

This commit is contained in:
Kiril Videlov 2024-11-10 12:40:34 +01:00
parent 1834815b83
commit 5bdb565884

View File

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