ejwa / gitinspector

:bar_chart: The statistical analysis tool for git repositories
GNU General Public License v3.0
2.35k stars 324 forks source link

gitinspector reports not showing correct number of commits #190

Closed yogesh9391 closed 5 years ago

yogesh9391 commented 5 years ago

Hi, I am running gitinspector's latest code from master branch as I need to have support for multiple branches. I started with the following command.--

/opt/gitinspector/gitinspector.py -HTlr --grading --format=htmlembedded --file-types=sh,yml,yaml,py,conf,"**" --since="2018-05-20" > report.html .

I am running above command once in a week every thursday by changing the "--since" parameter value to get report for the week of my master branch. After analyzing the report, I cross checked the commits done by author X manually at github and value given by gitinspector. I found that both are different, by 4 to 5 commits. Is that date value omitting commits done on mentioned date in "--since" parameter. Here, I am not mentioning "--until=" parameter. Hoping it is taking the time at which gitinspector tool run. Note:- 1. I am not sure about the location of github repository ie timezone.

  1. Its an enterprise github.

Also, May I know the detail documentation of the fields in the reports generated by gitinspetcor gitinpsector version is latest one ie. 0.5.0

yogesh9391 commented 5 years ago

I am getting different statistics than the git rev-list --count HEAD --since="Sep 05 2018" --author="<name>
command.
statistics comparison is as --- auth git git-inspector y1 42 40 S1 51 31 a1 32 29 r1 34 28 s2 19 18 . . . . . . . . . . . . S2 3 1 r9 2 1

TOTAL 230 188

Also some of authors are ignored....Am I missing something to add ??

adam-waldenberg commented 5 years ago

Hi @yogesh9391 This seems to be the same issue as the one discussed in #179 . Concerning documentation... I'm not sure what you want to know ? I'm not going to explain the complete output, as the majority uses normal git jargon and should be pretty self-explanatory. Pull requests with better documentation are always appreciated though.

yogesh9391 commented 5 years ago

Hi adam-waldenberg, The issue #179 is talking about the interval and in my command I am not giving any "--until" parameter. Is git inspector taking any default value for the "--until" parameter ? Also, the interval given in issue #179 is for one minute only. So, I don't think it is similar to the #179.

adam-waldenberg commented 5 years ago

@yogesh9391

No. It won't set it unless you specifically do so yourself - but I think there might still be something going on here regardless of if you use --since or --until ... I think the threading code introduced in changes.py might be causing some problems. Regarding the ignored authors - gitinspector always ignores pure binary commits - the use case is to track code and actual work on a code base of a repository.

yogesh9391 commented 5 years ago

ok adam. But there are some commits which are having pure code. And they are missed by gitinspector. I counted manually. And what if commit is mixture of binary and code??

adam-waldenberg commented 5 years ago

@yogesh9391

If it's a mixture, it's always counted.

Again, this issue is related to #179 and identified long ago. There you can also find the exact commit that introduced the problem. The solution is to disable the threading in the changes module. You could also run the 0.4.1 version - which does not have this problem.

yogesh9391 commented 5 years ago

Thanks Adam. I may go with older versions, but it doesnot have support for multiple repositories. Also, the generated report shows commits having PR + commits. Is there any way to get only PR ?

adam-waldenberg commented 5 years ago

@yogesh9391

I'm actually planning to do some work on the release of 0.5.0 pretty soon and fix most of the issues queued up.

If you are talking about pull requests, then no... A pull requests can be squashed, rebased or merged when accepted. So the information about pull requests is something you see on GitHub, it's not really related to git itself.

yogesh9391 commented 5 years ago

@adam-waldenberg Thanks adam for the reply.