Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
remote-helper: Rename `to_branch_name`
Lorenz Leutgeb committed 2 months ago
commit 4d7b942b7555b2c334a45b05cd0ee074cf9fa0e1
parent 6d2a99e
2 files changed +2 -2
modified crates/radicle-remote-helper/src/main.rs
@@ -176,7 +176,7 @@ enum Branch {
impl Branch {
    /// Return the branch name to be used for the local branch when creating a
    /// patch.
-
    fn to_branch_name(self, object: &radicle::patch::PatchId) -> Option<git::fmt::Qualified<'_>> {
+
    fn into_branch_name(self, object: &radicle::patch::PatchId) -> Option<git::fmt::Qualified<'_>> {
        match self {
            Self::None => None,
            Self::MirrorUpstream => Some(git::refs::patch(object)),
modified crates/radicle-remote-helper/src/push.rs
@@ -637,7 +637,7 @@ where
    )?;

    if let Some(upstream) = upstream {
-
        if let Some(local_branch) = opts.branch.to_branch_name(&patch) {
+
        if let Some(local_branch) = opts.branch.into_branch_name(&patch) {
            fn strip_refs_heads(qualified: git::fmt::Qualified) -> git::fmt::RefString {
                let (_refs, _heads, x, xs) = qualified.non_empty_components();
                std::iter::once(x).chain(xs).collect()