Practice ยท 3 of 3
Reflog Walk
reflog is an array of { head, action } entries, newest FIRST. Write lastGood(reflog, badAfterAction) โ walk the reflog and return the head of the newest entry at or before the LAST occurrence of an entry whose action is "commit". (In real terms: find the most recent committed state.) Return null if none.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Recovery Drills โ Practice