pub fn drop_squashed_by_tree_id(
graph: &mut Graph,
pulled_tree_ids: impl Iterator<Item = Oid>,
)
Expand description
Quick pass for what is droppable
We get into this state when a branch is squashed. The id would be different due to metadata
but the tree_id
, associated with the repo, is the same if your branch is up-to-date.
The big risk is if a commit was reverted. To protect against this, we only look at the final state of the branch and then check if it looks like a revert.
To avoid walking too much of the tree, we are going to assume only the first branch in a stack could have been squash-merged.
This assumes that the Node was rebased onto all of the new potentially squash-merged Nodes and
we extract the potential tree_id
’s from those protected commits.