Fix bug when remove all files in a repo.