As it's quite a lower level method, I'd rather keep `CalculateHistoryDivergence()` expect valid `Commit`s to work with.

I've pushed some additional commits to actually delegate more to the `HistoryDivergence` type. How does those feel?

I agree with you, though, that the null checks are pretty ugly. Any idea about how to make this prettier?