this seems to work. except for repos with a large history