pub fn stacked_layers(line: &[String]) -> Result<Vec<String>>Expand description
The branches in line that actually stack on something - those with a
recorded parent. A line rooted off the trunk keeps its parentless root
(see path_from_root), and that root is the base the branch above it
targets, not a layer of the stack: nothing submits, pushes, or merges it.
restack and absorb already skip it; this is how the rest agree.
Only a line’s first branch can be parentless - path_from_root stops
where the parents run out, and descendants are found through theirs - so
an empty result means the line is a single unstacked branch, which callers
report rather than silently skip.