gitinspector
gitinspector copied to clipboard
Gather stats from branches and/or sub-directories
The current version only reports statistics for the currently active branch. Can I get statistics of all the branches combined?
Hi @suhasxavier.
Yes. This could work in a similar way to #24. Gitinspector will support specifying sub directories on the command line when supplying a repository. This has been briefly covered in #67, as well. We can add support for branches as well.
I'm targeting this to be implemented relatively soon, as I believe it's a very useful feature.
Just making a note here.
When implementing this feature, it should also include support for a syntax similar to:
gitinspector.py <options> <repo-location>:*
Which would gather statistics from all branches available. While useless on bigger repositories with an almost infinite number of branches, this would be a nice feature on smaller repos with few branches and would remove the need of having to specify each branch individually.
Hi, any progress on this issue? This would be extremely useful for me!
@Subject22, Planned to be looked at once I have completed a 0.5.0 release. In the meantime, patches are welcome if anybody feels they would like a crack at it.
In the meantime, you can combine statistics from branches by checking out each branch in a separate repo/location and specifying each individual repo on the command line to gitinspector. Not perfect, but should "work".
Cool, thanks! Haha, neat workaround. I'll see how I go.
On 3/08/2016, at 3:33 AM, Adam Waldenberg [email protected] wrote:
@Subject22, Planned to be looked at once I have completed a 0.5.0 release. In the meantime, patches are welcome if anybody feels they would like a crack at it.
In the meantime, you can combine statistics from branches by checking out each branch in a separate repo/location and specifying each individual repo on the command line to gitinspector. Not perfect, but should "work".
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Sorry for the last late comment. I have two folders like you recommend @adam-waldenberg one with the branch master and the other with the branch development but I don't get quite right the command to merge the statistics.
gitinspector -HTlrmw -F html -f axlsx,coffee,css,haml,html,inky-haml,js,rb,scss,txt,xml,yml,erb,rake,xslt,jbuilder folder-master folder-dev > stats.html
Maybe I'm using the wrong command? Any help will be appreciated. Regards
What’s the output? Your command looks correct to me. I’ve used similar commands in the past without issue.
@JNajera Looks fine to me. Just make sure you are using a gitinspector version that actually supports specifying multiple repos. Too see when and where it was implemented, take a look at issue #24.
Thanks for your comments! You were right @adam-waldenberg I have version 0.4 instead of 0.5 I will update it and try again. Thanks for the quick response. Regards!
Out of curiosity, why was #67 closed? I'm looking into using gitinspector to get stats on subfolders within a monorepo. It looks like #67 would have provided that capability.
Just making a note here.
When implementing this feature, it should also include support for a syntax similar to:
gitinspector.py <options> <repo-location>:*
Which would gather statistics from all branches available. While useless on bigger repositories with an almost infinite number of branches, this would be a nice feature on smaller repos with few branches and would remove the need of having to specify each branch individually.
I know it's been a long time since this issue has been active, but does this syntax work only with remote repositories? I've been trying to figure out how to do this with a local repository without success.
EDIT: Actually I couldn't get this to work even with remote repositories. I'm guessing that's why this issue is still open.
Still on the todo list @Spacarar. Most likely branches will be checked out to a temporary location and checked once this is implemented - similar to how 0.5.0 supports http(s)// repositories.
Out of curiosity, why was #67 closed? I'm looking into using gitinspector to get stats on subfolders within a monorepo. It looks like #67 would have provided that capability.
Completely missed your comment @sidshank. But as stated in #67 you can already filter subfolders or target subfolders using regular expressions. For example, -x "^(?!(subdir/))"
would only show statistics for files in subdir
.