tomgi / git_stats

GitStats is a git repository statistics generator.
MIT License
1.08k stars 154 forks source link

Trying to use on Windows, cannot get it working - fatal: |: no such path in the working tree. #71

Open OndrejSpanel opened 7 years ago

OndrejSpanel commented 7 years ago

I have no Ruby experience. I wanted to try using this tool on Windows 10 x64. I did following:

HEADS UP! Haml 4.0 has many improvements, but also has changes that may break your application:

Commands: git_stats generate # Generates the statistics of a repository git_stats help [COMMAND] # Describe available commands or one specific com...

Got following response:


W:\Test\ActorRequests>git_stats generate
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 .
D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/git_data/repo.rb:9:in `rescue in files_by_extension_count': GitStats::GitData::Repo#files_by_extension_count delegated to last_commit.files_by_extension_count, but last_commit is nil: #], @project_name="ActorRequests", @command_runner=#, @command_parser=#, @commits=[], @activity=#{}, 1=>{}, 2=>{}, 3=>{}, 4=>{}, 5=>{}, 6=>{}}, @by_month={}, @by_year={}, @by_year_week={}>, @authors=[#, @name="Ond\u0159ej \u0160pan\u011Bl", @email="OndrejSpanel@users.noreply.github.com", @commits=[]>], @comment_count_each_day={}, @files_count_each_day={}> (Module::DelegationError)
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/git_data/repo.rb:9:in `files_by_extension_count'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/repo_charts.rb:13:in `block in files_by_extension'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/chart.rb:13:in `initialize'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/repo_charts.rb:11:in `new'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/repo_charts.rb:11:in `files_by_extension'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/charts.rb:6:in `files_by_extension'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/_files.haml:15:in `block in singleton class'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/_files.haml:-9:in `instance_eval'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/_files.haml:-9:in `singleton class'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/_files.haml:-11:in `__tilt_20283320'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:167:in `call'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:167:in `evaluate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/haml.rb:19:in `evaluate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:102:in `render'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/template.rb:15:in `render'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view_data.rb:18:in `render_partial'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:1:in `block in singleton class'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:-10:in `instance_eval'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:-10:in `singleton class'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:-12:in `__tilt_20283320'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:167:in `call'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:167:in `evaluate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/haml.rb:19:in `evaluate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:102:in `render'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/template.rb:13:in `block in render'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/layout.haml:30:in `block in singleton class'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/layout.haml:-10:in `instance_eval'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/layout.haml:-10:in `singleton class'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/templates/layout.haml:-12:in `__tilt_20283320'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:167:in `call'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:167:in `evaluate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/haml.rb:19:in `evaluate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tilt-2.0.5/lib/tilt/template.rb:102:in `render'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/template.rb:13:in `render'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view.rb:15:in `block in render_all'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view.rb:14:in `each'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view.rb:14:in `render_all'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/generator.rb:5:in `render_all'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/lib/git_stats/cli.rb:20:in `generate'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/git_stats-1.0.14/bin/git_stats:10:in `'
        from D:/Ruby23-x64/bin/git_stats:22:in `load'
        from D:/Ruby23-x64/bin/git_stats:22:in `
'
MaiconSpielmann commented 7 years ago

Também estou com o mesmo erro!

colonelchlorine commented 7 years ago

Same situation

homersimpsons commented 6 years ago

As the output pasted is not full (some parts have been escaped) I repaste it here:

fatal: |: no such path in the working tree.
Use 'git <command> -- <path>...' 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:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/git_data/repo.rb:9:in `rescue in files_by_extension_count': GitStats::GitData::Repo#files_by_extension_count delegated to last_commit.files_by_extension_count, but last_commit is nil: #<GitStats::GitData::Repo:0x00000003e10c28 @path="D:/DEV/Projects/HungryUp/API", @out_path="./git_stats", @language="en", @last_commit_sha="HEAD", @tree=".", @comment_string="//", @tree_path=".", @command_observers=[#<Proc:0x00000004d59310@C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/cli.rb:19>], @project_name="API", @command_runner=#<GitStats::CommandRunner:0x00000003f740b0>, @command_parser=#<GitStats::CommandParser:0x00000003f6f8a8>, @commits=[], @activity=#<GitStats::GitData::Activity:0x00000003f6ec50 @by_date={}, @by_wday={}, @by_hour={}, @by_wday_hour={0=>{}, 1=>{}, 2=>{}, 3=>{}, 4=>{}, 5=>{}, 6=>{}}, @by_month={}, @by_year={}, @by_year_week={}>, @authors=[#<GitStats::GitData::Author:0x000000031cb7b0 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Alex", @email="alexandre@corpovia.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031cb620 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Alex", @email="alexandre@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031cb4b8 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Alexandre Surin", @email="alexandre-surin@live.fr", @commits=[]>, #<GitStats::GitData::Author:0x000000031cb378 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Gaël", @email="gael@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031cb210 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Gaël Demette", @email="demette.gael@gmail.com", @commits=[]>, #<GitStats::GitData::Author:0x000000031cb0d0 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Gaël Demette", @email="gael@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031caf68 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Guillaume", @email="guillaume.hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031cae28 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Guillaume", @email="guillaume@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031cace8 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="HungryUp", @email="alexandre@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031cab58 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Julien", @email="julien@hungry.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031ca9f0 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Kevin", @email="kevin@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031ca888 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="Kevin Wenner", @email="kevin@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031ca748 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="beau-oudong", @email="beau-oudong@hungryup.co", @commits=[]>, #<GitStats::GitData::Author:0x000000031ca5e0 @repo=#<GitStats::GitData::Repo:0x00000003e10c28 ...>, @name="hungryup", @email="alexandre@hungryup.co", @commits=[]>], @comment_count_each_day={}, @files_count_each_day={}> (Module::DelegationError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/git_data/repo.rb:9:in `files_by_extension_count'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.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:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/chart.rb:13:in `initialize'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/repo_charts.rb:11:in `new'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/repo_charts.rb:11:in `files_by_extension'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/charts/charts.rb:6:in `files_by_extension'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/_files.haml:15:in `block in singleton class'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/_files.haml:-2:in `instance_eval'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/_files.haml:-2:in `singleton class'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/_files.haml:-5:in `__tilt_17496680'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `call'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `evaluate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/haml.rb:24:in `evaluate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:109:in `render'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/template.rb:15:in `render'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view_data.rb:18:in `render_partial'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:1:in `block in singleton class'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:-3:in `instance_eval'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:-3:in `singleton class'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/files/by_extension.haml:-6:in `__tilt_17496680'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `call'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `evaluate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/haml.rb:24:in `evaluate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:109:in `render'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/template.rb:13:in `block in render'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/layout.haml:30:in `block in singleton class'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/layout.haml:-3:in `instance_eval'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/layout.haml:-3:in `singleton class'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/templates/layout.haml:-6:in `__tilt_17496680'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `call'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:170:in `evaluate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/haml.rb:24:in `evaluate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:109:in `render'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/template.rb:13:in `render'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view.rb:15:in `block in render_all'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view.rb:14:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/stats_view/view.rb:14:in `render_all'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/generator.rb:5:in `render_all'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/lib/git_stats/cli.rb:20:in `generate'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/git_stats-1.0.14/bin/git_stats:10:in `<top (required)>'
        from C:/Ruby24-x64/bin/git_stats:22:in `load'
        from C:/Ruby24-x64/bin/git_stats:22:in `<main>'
edwardhamilton commented 3 years ago

I'm having same issue.