use dirname as repoID
support omitting array when there is only one source