Fix off-by-one in FakeGitRepository::reset truncation
Richard Feldman
created
The truncate(target_index + 1) call was a no-op when pop_count == 1
because target_index was len-1, so truncate(len) kept all elements.
This meant subsequent resets kept returning the same commit.
Fix: read the snapshot at target_index first, then truncate to
target_index (removing the consumed entry).