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

Gather stats from branches and/or sub-directories #92

Open
suhasxavier opened this issue Dec 16, 2015 · 13 comments
Open

Gather stats from branches and/or sub-directories #92

suhasxavier opened this issue Dec 16, 2015 · 13 comments

Comments

@suhasxavier
Copy link

The current version only reports statistics for the currently active branch. Can I get statistics of all the branches combined?

@adam-waldenberg
Copy link
Member

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.

@adam-waldenberg adam-waldenberg added this to the 0.5.1 milestone Dec 16, 2015
@adam-waldenberg adam-waldenberg changed the title Gather stats from multiple branches Gather stats from branches and/or sub-directories Dec 16, 2015
@adam-waldenberg
Copy link
Member

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.

@AndrewC-B
Copy link

Hi, any progress on this issue? This would be extremely useful for me!

@adam-waldenberg
Copy link
Member

@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".

@AndrewC-B
Copy link

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.

@JNajera
Copy link

JNajera commented Nov 12, 2018

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

@AndrewC-B
Copy link

What’s the output? Your command looks correct to me. I’ve used similar commands in the past without issue.

@adam-waldenberg
Copy link
Member

@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.

@JNajera
Copy link

JNajera commented Nov 12, 2018

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!

@sidshank
Copy link

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.

@Spacarar
Copy link

Spacarar commented May 7, 2020

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.

@adam-waldenberg
Copy link
Member

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.

@adam-waldenberg
Copy link
Member

adam-waldenberg commented May 8, 2020

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.

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

6 participants