Skip to main content

is_ancestor

Function is_ancestor 

Source
pub fn is_ancestor(ancestor: &str, descendant: &str) -> bool
Expand description

Whether ancestor is reachable from descendant (merge-base --is-ancestor).

is_ancestor("origin/main", "HEAD") answers “is this branch already on top of the latest main?” — the check behind “already up to date” in gw sync and the behind-main detection in gw status.