in src/flagutil.js [56:77]
function addRepo (repo) {
if (!addedIds[repo.id]) {
addedIds[repo.id] = true;
// If we're not requesting modules be included, then we want to de-dup in the case where two repos have the
// same repoName (because one or both is actually a sub-module). This probably means we're doing a repo level
// operation, so it doesn't matter which we keep, but we'll prefer the one that represents the base repo.
if (includeModules) {
ret.push(repo);
} else {
const existingRepo = addedRepos[repo.repoName];
if (!existingRepo || !repo.isModule) {
if (existingRepo) {
ret[ret.indexOf(existingRepo)] = repo;
} else {
ret.push(repo);
}
addedRepos[repo.repoName] = repo;
}
}
}
}