Module branchless::core::gc
source · [−]Expand description
Deal with Git’s garbage collection mechanism.
Git treats a commit as unreachable if there are no references that point to it or one of its descendants. However, the branchless workflow requires keeping such commits reachable until the user has obsoleted them.
This module is responsible for adding extra references to Git, so that Git’s garbage collection doesn’t collect commits which branchless thinks are still active.
Functions
Find references under
refs/branchless/
which point to commits which are no
longer active. These are safe to remove.Mark a commit as reachable.