Comments (14)
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.
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.
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.
Thanks for helping! Indeed the repository was corrupted. After fixing it git_stats worked like a charm.
from git_stats.
@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.
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.
👍 Brilliant tool, cheers. I just wish I saved my self 90 minutes of pain by spotting the header for this issue :)
from git_stats.
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:in
files_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:in
initialize'
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:in
files_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:in
block 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:in
singleton 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:in
call'
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: in
evaluate'
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:in
render'
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:in
block 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:in
singleton 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:in
call'
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: in
evaluate'
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:in
block 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:in
instance_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:in
evaluate'
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: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: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:in
block 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:in
render_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:in
generate'
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:in
invoke_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:in
start'
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:in
load'
from C:/Ruby200/bin/git_stats:23:in `
Regards,
Pierre
from git_stats.
Same Problem here. How can I solve this problem?
Thanks for your help
Chrishe
from git_stats.
i got the same error as above
from git_stats.
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.
@SebastianCelejewski could you please share with us your code ?
from git_stats.
@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:
@tomgi could you please add diffs from this commit to master branch ?
from git_stats.
@SebastianCelejewski Thank you very much, you have saved me a lot of time.
from git_stats.
Related Issues (20)
- Failing to generate on macOS Sierra v10.12.6
- git_stats not support gitlab V12??
- git_stats is not considering merge commits for displaying git changes
- Performing git stats encountered an error HOT 1
- undefined method `new' for BigDecimal:Class (NoMethodError) with Ruby 2.7.0 HOT 5
- All the example links in the readme file are dead HOT 2
- DEAD PROJECT: use a fork instead HOT 1
- How do you excluded submodules? HOT 2
- Is there an easy way to merge stats of several repos? HOT 6
- Bump and release a new version? HOT 2
- Performance/Speed HOT 1
- No. of commits differ
- gem install fails on macOS High Sierra v10.13.2 HOT 6
- Lines added / deleted are inaccurate
- is it possible to merge stats of several user's commits?
- install on WSL
- fatal: |: no such path in the working tree. HOT 3
- reading log message from standard input HOT 3
- Hour of GMT day activity
- Tree option not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git_stats.