Function mark_commit_reachable

Source
pub fn mark_commit_reachable(repo: &Repo, commit_oid: NonZeroOid) -> Result<()>
Expand description

Mark a commit as reachable.

Once marked as reachable, the commit won’t be collected by Git’s garbage collection mechanism until first garbage-collected by branchless itself (using the gc function).

If the commit does not exist (such as if it was already garbage-collected), then this is a no-op.

Args:

  • repo: The Git repository.
  • commit_oid: The commit OID to mark as reachable.