Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: fix divergence check
Fintan Halpenny committed 2 years ago
commit 499738de711ee96343163550f2e053bdba248c1a
parent cd4c44986aaaa537232d83efe4020c2349efa65b
1 file changed +3 -1
modified radicle-remote-helper/src/push.rs
@@ -230,7 +230,9 @@ pub fn run(
                            let head = working.find_reference(src.as_str())?;
                            let head = head.peel_to_commit()?.id();

-
                            if !working.graph_descendant_of(head, **canonical_oid)? {
+
                            if head != **canonical_oid
+
                                && !working.graph_descendant_of(head, **canonical_oid)?
+
                            {
                                eprintln!(
                                    "hint: you are attempting to push a commit that would \
                                    cause your upstream to diverge from the canonical head"