Unit tests and implementation for VCSRepo.tip()