Giter VIP home page Giter VIP logo

Comments (14)

SebastianCelejewski avatar SebastianCelejewski commented on August 23, 2024 1

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.

from git_stats.

lucaminudel avatar lucaminudel commented on August 23, 2024

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.

from git_stats.

tomgi avatar tomgi commented on August 23, 2024

Sounds like corrupted repository, verify it with

$ git fsck --full

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

from git_stats.

lucaminudel avatar lucaminudel commented on August 23, 2024

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

from git_stats.

petersondrew avatar petersondrew commented on August 23, 2024

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

from git_stats.

tomgi avatar tomgi commented on August 23, 2024

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.

from git_stats.

chrisloughnane avatar chrisloughnane commented on August 23, 2024

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

from git_stats.

pierreldff avatar pierreldff commented on August 23, 2024

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

from git_stats.

circleart avatar circleart commented on August 23, 2024

Same Problem here. How can I solve this problem?

Thanks for your help
Chrishe

from git_stats.

nysander avatar nysander commented on August 23, 2024

i got the same error as above

from git_stats.

SebastianCelejewski avatar SebastianCelejewski commented on August 23, 2024

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.

from git_stats.

eko24 avatar eko24 commented on August 23, 2024

@SebastianCelejewski could you please share with us your code ?

from git_stats.

eko24 avatar eko24 commented on August 23, 2024

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

from git_stats.

Jameszjhe avatar Jameszjhe commented on August 23, 2024

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

from git_stats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.