A genealogical approach to quantifying lineage divergence