Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of developers metric is way off for repositories like linux #8

Open
tofferrosen opened this issue Mar 17, 2014 · 1 comment
Open
Assignees

Comments

@tofferrosen
Copy link
Member

For instance, in the linux repository, drivers/net/usb/qmi_wwan.c does not have 2,210 developers.

@tofferrosen tofferrosen self-assigned this Mar 17, 2014
@niekvanderlaan
Copy link

niekvanderlaan commented Apr 29, 2021

I think this bug is caused in ingester/git.py, where you apply the following logic:

setattr(prevFileChanged, 'authors', authors)

however, authors is the list of all authors that touched the files changed in the current files. I think this is resolved by appending the author of the current commit to prevAuthors, and assign prevAuthors to the authors attribute. i.e.:

prevAuthors.append(author)
setattr(prevFileChanged, 'authors', prevAuthors)

EDIT:
this error is also made in the else case, i.e. when creating a new CommitFile:

fileObject = CommitFile(fileName, fileLa - fileLd, authors, unixTimeStamp)

Following this logic, the authors of the file are equal to all previous authors of all files changed in the current commit. This should therefore be updated to:

fileObject = CommitFile(fileName, fileLa - fileLd, [author], unixTimeStamp)

Furthermore, I would suggest storing the authors in sets, rather than lists. This makes for efficient lookup of whether an author is in the set of authors, rather than explicitly checking it by traversing the entire list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants