Skip to content

Remove global interval.__ref__ to avoid race #132

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

Closed
wants to merge 2 commits into from

Conversation

redbaron
Copy link

@redbaron redbaron commented Oct 21, 2016

previously it was broken when multiple repos where exemined and '--since' was used: global interval.__ref__ was set to a commit ID valid for only one last examined repo, making it fail for all others

@adam-waldenberg
Copy link
Member

@redbaron Thank you. Good catch. I'll try to include this in the next 0.4.5 release.

@redbaron redbaron force-pushed the fix-changes-blame-race branch from 2af7bb1 to 66a18ad Compare October 21, 2016 10:47
If submodule used to be in history but since then was deleted,
`git show <commit>:submodule_path` would produce `bad object` error
as no info about given submodule can be found in HEAD.
@redbaron redbaron force-pushed the fix-changes-blame-race branch from 66a18ad to 5361175 Compare October 21, 2016 10:54
@redbaron
Copy link
Author

Also piggyback change to skip submodules

adam-waldenberg added a commit that referenced this pull request May 13, 2017
Previoulsy, we were just checking against the changes returned from the
last repository analyzed - which of course broke the whole thing if that
repository had no matching commits!
adam-waldenberg added a commit that referenced this pull request May 13, 2017
If the changeset was empty or filtered with no matching files a bunch of
errors would be thrown from git with no proper results being returned
back to gitinspector.

We now pipe stderr (catching the output) and also check the return code
when running these commands.
@adam-waldenberg
Copy link
Member

@redbaron This should be fixed. I decided to handle it slightly differently and with the same changes also fix a different issue happening when analyzing multiple repos, as seen in #115.

When it comes to submodules - I don't think we should skip them altogether. It's probably better to handle the fact that they have been removed. Maybe a new pull request handling this would be an idea. If you are up for it. People use submodules to merge statistics from multiple repos sometimes.

Let me know if any issues still persist related to ref.

@adam-waldenberg adam-waldenberg self-assigned this May 13, 2017
@redbaron redbaron deleted the fix-changes-blame-race branch May 14, 2017 23:03
@adam-waldenberg adam-waldenberg modified the milestones: 0.4.5, 0.5.0 Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants