ejwa / gitinspector

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

[Documentation] Date example #140

Closed singram closed 7 years ago

singram commented 7 years ago

I'm attempting to use the --since flag with the --grading flag. The --since flag does not appear to be working and does not report out on expected date format or invalid date supplied.

Given this, an example of the date format expected in the documentation/help output of the tool would be useful especially in light of the fantastic international support in this tool.

adam-waldenberg commented 7 years ago

@singram Hi.

This is already somewhat (badly) covered in the git documentation. The flag is simply passed along to git when doing the analysis. The format is in aproxidate. Also, this has changed a few times and has been extended.

In any case, we can't really document it properly, as it is tightly bound to the version of git you happen to have on your system.

The flag itself should be working though...

singram commented 7 years ago

No problem @adam-waldenberg thanks for the response. Took me a little experimentation to figure out the correct invocation, for instance --since xxx does not error --since=xxx does not error --since=20160101 does not error --since=2016-01-01 worked

I wonder if there's an enhancement to provide more feedback to the user as to whether the input is interpreted correctly or not. Maybe some kind of middle ground given the complexities around git versioning.

Anyway, just discovered the project today and think it's phenomenal. Thanks for all the work, just wanted to share my experience. Great response turnaround too!

adam-waldenberg commented 7 years ago

@singram Great. I'm glad it's useful :). The project has gotten fairly little attention for a while as I am setting up a data center here in Gothenburg, but I'm hoping to get some more work done on gitinspector early next year.

Since a while back, aproxidate also accepts descriptive strings such as "300 days" and "50 months" or similar. Everything in the ISO 8601 format is also accepted - plus some other formats. Basically, tI think the only way to truly figure out what is supported in your version is to check the "date.c" file in the git source code.

As far as I know there is no way to get git to tell you if it gets parsed correctly, it just fails silently and returns zero to the shell (command successful).