A groundbreaking archaeological study has revealed when domestic dogs first began to show the remarkable diversity of today.