Function branchless::core::rewrite::find_rewrite_target
source · pub fn find_rewrite_target(
event_replayer: &EventReplayer,
event_cursor: EventCursor,
oid: NonZeroOid
) -> Option<MaybeZeroOid>Expand description
For a rewritten commit, find the newest version of the commit.
For example, if we amend commit abc into commit def1, and then amend
def1 into def2, then we can traverse the event log to find out that def2
is the newest version of abc.
If a commit was rewritten into itself through some chain of events, then
returns None, rather than the same commit OID.