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

Currently it works only under linux, add windows support #1

Open
tomgi opened this issue Oct 24, 2012 · 14 comments
Open

Currently it works only under linux, add windows support #1

tomgi opened this issue Oct 24, 2012 · 14 comments

Comments

@tomgi
Copy link
Owner

tomgi commented Oct 24, 2012

No description provided.

@lucaminudel
Copy link

With Ubuntu, Ruby 1.9.3 and git_stat 1.0.3 I got many errors like
error: wrong index v2 file size in .git/objects/pack/pack-7f8cc50b1fbf80a6e90046c6d0785ad96492f950.idx

The git repository is from Bitbucket.

@tomgi
Copy link
Owner Author

tomgi commented Nov 4, 2012

Sounds like corrupted repository, verify it with

$ git fsck --full

If it doesn't help maybe try cloning it again from bitbucket.

@lucaminudel
Copy link

Thanks for helping! Indeed the repository was corrupted. After fixing it git_stats worked like a charm.

@petersondrew
Copy link

@tomgi I would be willing to help add Windows support, do you already have a list of items that need to be fixed?

@tomgi
Copy link
Owner Author

tomgi commented Apr 21, 2013

I have no idea, just try to run it and see where it crashes ;)
The main problem are unix commands like grep used in some places.

@chrisloughnane
Copy link

👍 Brilliant tool, cheers. I just wish I saved my self 90 minutes of pain by spotting the header for this issue :)

@pierreldff
Copy link

Hi,
I try to use it on windows and i get this
fatal: |: no such path in the working tree.
Use 'git -- ...' to specify paths that do not exist locally.
git rev-list --pretty=format:'%h|%at|%ai|%aE' HEAD . | grep -v commit
git shortlog -se HEAD .
C:in rescue in files_by_extension_count': GitStats::GitData::Repo#files_by_exte nsion_count delegated to last_commit.files_by_extension_count, but last_commit i(...) from C:infiles_by_extension_count'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/
stats_view/charts/repo_charts.rb:13:in block in files_by_extension' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ stats_view/charts/chart.rb:13:ininitialize'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/
stats_view/charts/repo_charts.rb:11:in new' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ stats_view/charts/repo_charts.rb:11:infiles_by_extension'
from C:in files_by_extension' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file s/_files.haml:15:inblock in singleton class'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file
s/_files.haml:131063:in instance_eval' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file s/_files.haml:131063:insingleton class'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file
s/_files.haml:131061:in __tilt_17639604' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb :155:incall'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb
:155:in evaluate' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/haml.rb:17: inevaluate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb
:96:in render' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ stats_view/template.rb:15:inrender'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/
stats_view/view_data.rb:18:in render_partial' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file s/by_extension.haml:1:inblock in singleton class'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file
s/by_extension.haml:131062:in instance_eval' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file s/by_extension.haml:131062:insingleton class'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/file
s/by_extension.haml:131060:in __tilt_17639604' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb :155:incall'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb
:155:in evaluate' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/haml.rb:17: inevaluate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb
:96:in render' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ stats_view/template.rb:13:inblock in render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/layo
ut.haml:30:in block in singleton class' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/layo ut.haml:131062:ininstance_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/layo
ut.haml:131062:in singleton class' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/templates/layo ut.haml:131060:in__tilt_17639604'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb
:155:in call' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb :155:inevaluate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/haml.rb:17:
in evaluate' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-2.0.1/lib/tilt/template.rb :96:inrender'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/
stats_view/template.rb:13:in render' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ stats_view/view.rb:15:inblock in render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/
stats_view/view.rb:14:in each' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ stats_view/view.rb:14:inrender_all'
from C:in render_all' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/lib/git_stats/ cli.rb:20:ingenerate'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb
:27:in run' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation .rb:126:ininvoke_command'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in
dispatch' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:44 0:instart'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/git_stats-1.0.14/bin/git_stats:
10:in <top (required)>' from C:/Ruby200/bin/git_stats:23:inload'
from C:/Ruby200/bin/git_stats:23:in `

'

Regards,
Pierre

@circleart
Copy link

Same Problem here. How can I solve this problem?

Thanks for your help
Chrishe

@nysander
Copy link

i got the same error as above

@SebastianCelejewski
Copy link

I am able to run git_stats on Windows after I installed git bash and gnu grep, and after I made a couple of modifications to the code. I don't know how to make it running on both Linux, and Windows yet.

@eko24
Copy link

eko24 commented Sep 29, 2015

@SebastianCelejewski could you please share with us your code ?

@SebastianCelejewski
Copy link

It is on this branch:
https://github.com/SebastianCelejewski/git_stats/tree/bug_undefined_method_files_by_extension_count_for_nil_NilClass

To make it work under Windows I had to make some changes to the code, and install some Unix-like tools under Windows. Unfortunately I don't remember any details, but diff should explain everything.

@eko24
Copy link

eko24 commented Sep 30, 2015

@SebastianCelejewski thank you so much !
I've applied your changes and it worked like a charm !
Except I wasn't able to see full Total lines info:
image
@tomgi could you please add diffs from this commit to master branch ?

@Jameszjhe
Copy link

@SebastianCelejewski Thank you very much, you have saved me a lot of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants