TemplateError occurred in commits#show

2 views
Skip to first unread message

Trevor

unread,
Jun 18, 2009, 4:02:07 AM6/18/09
to Gitorious
Getting "We're sorry, but something went wrong." when browsing
individual commits. I thought at first this was related to our other
issue where events were not persisted to the DB but now that is fixed
we still see this error (below).
Does anyone know what causes this?

cheers,
Trevor


A ActionView::TemplateError occurred in commits#show:

undefined method `[]' for nil:NilClass
On line #36 of app/views/commits/show.html.erb

33: <p><%= t("views.commits.message").call(self, tree_path
(@commit.id)) %></p>
34: <% else -%>
35: <% unless @commit.merge? -%>
36: <%= render_diff_stats(@commit.stats) -%>
37: <%= render_diffmode_selector -%>
38: <% @diffs.each do |file| -%>
39: <a name="<%= h(force_utf8(file.a_path)) -%>"></a>

vendor/grit/lib/grit/commit.rb:186:in `stats'
app/views/commits/show.html.erb:36
vendor/rails/actionpack/lib/action_controller/caching/fragments.rb:
43:in `call'
vendor/rails/actionpack/lib/action_controller/caching/fragments.rb:
43:in `fragment_for'
vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb:
35:in `cache'
app/views/commits/show.html.erb:31
vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `send'
vendor/rails/actionpack/lib/action_view/renderable.rb:34:in
`render'
vendor/rails/actionpack/lib/action_view/base.rb:301:in
`with_template'
vendor/rails/actionpack/lib/action_view/renderable.rb:30:in
`render'
vendor/rails/actionpack/lib/action_view/template.rb:199:in
`render_template'
vendor/rails/actionpack/lib/action_view/base.rb:260:in `render'
vendor/rails/actionpack/lib/action_view/base.rb:343:in
`_render_with_layout'
vendor/rails/actionpack/lib/action_view/base.rb:257:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:1242:in
`render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:943:in
`render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
51:in `render'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:10:in `realtime'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
51:in `render'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
135:in `send'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
135:in `custom'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
179:in `call'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
179:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
173:in `each'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
173:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
107:in `respond_to'
app/controllers/commits_controller.rb:66:in `show'
vendor/rails/actionpack/lib/action_controller/base.rb:1323:in
`send'
vendor/rails/actionpack/lib/action_controller/base.rb:1323:in
`perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:617:in
`call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
`perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in `perform_action_without_rescue'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:10:in `realtime'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in `perform_action_without_rescue'
vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
`perform_action_without_flash'
vendor/rails/actionpack/lib/action_controller/flash.rb:141:in
`perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:523:in
`send'
vendor/rails/actionpack/lib/action_controller/base.rb:523:in
`process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
`process'
vendor/rails/actionpack/lib/action_controller/base.rb:391:in
`process'
vendor/rails/actionpack/lib/action_controller/base.rb:386:in
`call'
vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:
433:in `call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:88:in
`dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:111:in
`_call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:82:in
`initialize'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/head.rb:
9:in `call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/head.rb:
9:in `call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/
methodoverride.rb:24:in `call'
vendor/rails/actionpack/lib/action_controller/params_parser.rb:
15:in `call'
vendor/rails/railties/lib/rails/rack/metal.rb:47:in `call'
vendor/rails/actionpack/lib/action_controller/session/
abstract_store.rb:122:in `call'
vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
`call'
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/query_cache.rb:34:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in
`cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in
`call'
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/connection_pool.rb:361:in `call'
vendor/rails/activesupport/lib/active_support/cache/strategy/
local_cache.rb:24:in `call'
vendor/rails/actionpack/lib/action_controller/failsafe.rb:11:in
`call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/lock.rb:
11:in `call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/lock.rb:
11:in `synchronize'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/lock.rb:
11:in `call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in
`call'
/usr/local/src/passenger/lib/phusion_passenger/rack/
request_handler.rb:91:in `process_request'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_request_handler.rb:206:in `main_loop'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:376:in `start_request_handler'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:334:in `handle_spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/utils.rb:182:in
`safe_fork'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:332:in `handle_spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
351:in `__send__'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
351:in `main_loop'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
195:in `start_synchronously'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
162:in `start'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:213:in `start'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
261:in `spawn_rails_application'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server_collection.rb:126:in `lookup_or_add'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
255:in `spawn_rails_application'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server_collection.rb:80:in `synchronize'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server_collection.rb:79:in `synchronize'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
254:in `spawn_rails_application'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
153:in `spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
286:in `handle_spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
351:in `__send__'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
351:in `main_loop'
/usr/local/src/passenger/lib/phusion_passenger/abstract_server.rb:
195:in `start_synchronously'
/usr/local/src/passenger/bin/passenger-spawn-server:61

-------------------------------
Request:
-------------------------------

* URL : http://git.company.org/project/project/commit/e43b2a5339196e8d510893178ab806bf22f6f7b5
* IP address: 192.168.1.131
* Parameters: {"project_id"=>"project", "action"=>"show",
"id"=>"e43b2a5339196e8d510893178ab806bf22f6f7b5",
"controller"=>"commits", "repository_id"=>"project"}
* Rails root: /var/www/gitorious

-------------------------------
Session:
-------------------------------

* session id: nil
* data: nil

-------------------------------
Environment:
-------------------------------

* DOCUMENT_ROOT : /var/www/gitorious/
public
* HTTP_ACCEPT : application/
xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/
*;q=0.5
* HTTP_ACCEPT_ENCODING : gzip, deflate
* HTTP_ACCEPT_LANGUAGE : en-us
* HTTP_CONNECTION : keep-alive
* HTTP_COOKIE :
_gitorious_sess=7b730d0784d0015925cd9d7a620bb68a; _logged_in=true;
auth_token=7a1a8755320959ea60bcd6e87d4aeb2163f8924d;
__utma=1.1220986013294026500.1225710680.1244615877.1245228500.97;
__utmc=1; __utmz=1.1243498305.88.2.utmcsr=google|utmccn=(organic)|
utmcmd=organic|utmctr=Cannot%20find%20lifecycle%20mapping%20for
%20packaging:; LOOPFUSE=7071b85b-e516-3a83-5325-71452e0cfb05;
SESS3d5db4009c20f237ef34ad61b7610c98=ibdiqauoe35mn370oj09q13of3
* HTTP_HOST : git.company.org
* HTTP_REFERER :
http://git.company.org/project/project/commits/master
* HTTP_USER_AGENT : Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17
(KHTML, like Gecko) Version/4.0 Safari/530.17
* PATH_INFO : /project/project/
commit/e43b2a5339196e8d510893178ab806bf22f6f7b5
* QUERY_STRING :
* REMOTE_ADDR : 192.168.1.131
* REMOTE_PORT : 57327
* REQUEST_METHOD : GET
* REQUEST_URI : /project/project/
commit/e43b2a5339196e8d510893178ab806bf22f6f7b5
* SCRIPT_NAME :
* SERVER_ADDR : 192.168.1.40
* SERVER_ADMIN :
webm...@company.com
* SERVER_NAME : git.company.org
* SERVER_PORT : 80
* SERVER_PROTOCOL : HTTP/1.1
* SERVER_SOFTWARE : Apache/2.2.11 (Unix)
mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 SVN/1.5.6 PHP/5.2.9
Phusion_Passenger/2.2.2
* _ : _
* action_controller.request.path_parameters :
project_idprojectactionshowide43b2a5339196e8d510893178ab806bf22f6f7b5controllercommitsrepository_idproject
* action_controller.request.query_parameters :
* action_controller.request.request_parameters:
* action_controller.rescue.request :
#<ActionController::Request:0x2aaaaff40630>
* action_controller.rescue.response :
#<ActionController::Response:0x2aaaaff40608>
* rack.errors : #<IO:0x2ae18dc60040>
* rack.input :
#<Rack::RewindableInput:0x2aaaaff83e08>
* rack.multiprocess : true
* rack.multithread : false
* rack.request.cookie_hash :
__utma1.1220986013294026500.1225710680.1244615877.1245228500.97__utmc1_gitorious_sess7b730d0784d0015925cd9d7a620bb68a__utmz1.1243498305.88.2.utmcsr=google|
utmccn=(organic)|utmcmd=organic|utmctr=Cannot find lifecycle mapping
for packaging:LOOPFUSE7071b85b-
e516-3a83-5325-71452e0cfb05auth_token7a1a8755320959ea60bcd6e87d4aeb2163f8924d_logged_intrueSESS3d5db4009c20f237ef34ad61b7610c98ibdiqauoe35mn370oj09q13of3
* rack.request.cookie_string :
_gitorious_sess=7b730d0784d0015925cd9d7a620bb68a; _logged_in=true;
auth_token=7a1a8755320959ea60bcd6e87d4aeb2163f8924d;
__utma=1.1220986013294026500.1225710680.1244615877.1245228500.97;
__utmc=1; __utmz=1.1243498305.88.2.utmcsr=google|utmccn=(organic)|
utmcmd=organic|utmctr=Cannot%20find%20lifecycle%20mapping%20for
%20packaging:; LOOPFUSE=7071b85b-e516-3a83-5325-71452e0cfb05;
SESS3d5db4009c20f237ef34ad61b7610c98=ibdiqauoe35mn370oj09q13of3
* rack.request.query_hash :
* rack.request.query_string :
* rack.run_once : false
* rack.session : user_id2flash
* rack.session.options :
httponlytruesecret13c58730b6445e3db5aad7fb9206ddc6cookie_onlytrueid7b730d0784d0015925cd9d7a620bb68asecurefalseexpire_after1814400domain.git.company.orgkey_gitorious_sesspath/
* rack.session.record :
#<ActiveRecord::SessionStore::Session:0x2aaaafec7258>
* rack.url_scheme : http
* rack.version : 10

* Process: 28562
* Server : amsterdam

-------------------------------
Backtrace:
-------------------------------

On line #36 of app/views/commits/show.html.erb

33: <p><%= t("views.commits.message").call(self, tree_path
(@commit.id)) %></p>
34: <% else -%>
35: <% unless @commit.merge? -%>
36: <%= render_diff_stats(@commit.stats) -%>
37: <%= render_diffmode_selector -%>
38: <% @diffs.each do |file| -%>
39: <a name="<%= h(force_utf8(file.a_path)) -%>"></a>

vendor/grit/lib/grit/commit.rb:186:in `stats'
app/views/commits/show.html.erb:36
vendor/rails/actionpack/lib/action_controller/caching/
fragments.rb:43:in `call'
vendor/rails/actionpack/lib/action_controller/caching/
fragments.rb:43:in `fragment_for'
vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb:
35:in `cache'
app/views/commits/show.html.erb:31
vendor/rails/actionpack/lib/action_view/renderable.rb:34:in
`send'
vendor/rails/actionpack/lib/action_view/renderable.rb:34:in
`render'
vendor/rails/actionpack/lib/action_view/base.rb:301:in
`with_template'
vendor/rails/actionpack/lib/action_view/renderable.rb:30:in
`render'
vendor/rails/actionpack/lib/action_view/template.rb:199:in
`render_template'
vendor/rails/actionpack/lib/action_view/base.rb:260:in `render'
vendor/rails/actionpack/lib/action_view/base.rb:343:in
`_render_with_layout'
vendor/rails/actionpack/lib/action_view/base.rb:257:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:1242:in
`render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:943:in
`render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
51:in `render'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:10:in `realtime'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
51:in `render'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
135:in `send'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
135:in `custom'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
179:in `call'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
179:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
173:in `each'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
173:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
107:in `respond_to'
app/controllers/commits_controller.rb:66:in `show'
vendor/rails/actionpack/lib/action_controller/base.rb:1323:in
`send'
vendor/rails/actionpack/lib/action_controller/base.rb:1323:in
`perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:617:in
`call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
`perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in `perform_action_without_rescue'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:10:in `realtime'
vendor/rails/activesupport/lib/active_support/core_ext/
benchmark.rb:17:in `ms'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
68:in `perform_action_without_rescue'
vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
`perform_action_without_flash'
vendor/rails/actionpack/lib/action_controller/flash.rb:141:in
`perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:523:in
`send'
vendor/rails/actionpack/lib/action_controller/base.rb:523:in
`process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
`process'
vendor/rails/actionpack/lib/action_controller/base.rb:391:in
`process'
vendor/rails/actionpack/lib/action_controller/base.rb:386:in
`call'
vendor/rails/actionpack/lib/action_controller/routing/
route_set.rb:433:in `call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
88:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
111:in `_call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
82:in `initialize'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/head.rb:
9:in `call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/head.rb:
9:in `call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/
methodoverride.rb:24:in `call'
vendor/rails/actionpack/lib/action_controller/params_parser.rb:
15:in `call'
vendor/rails/railties/lib/rails/rack/metal.rb:47:in `call'
vendor/rails/actionpack/lib/action_controller/session/
abstract_store.rb:122:in `call'
vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
`call'
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/query_cache.rb:34:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in
`cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in
`call'
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/connection_pool.rb:361:in `call'
vendor/rails/activesupport/lib/active_support/cache/strategy/
local_cache.rb:24:in `call'
vendor/rails/actionpack/lib/action_controller/failsafe.rb:11:in
`call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/lock.rb:
11:in `call'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/lock.rb:
11:in `synchronize'
/usr/local/src/passenger/vendor/rack-1.0.0-git/lib/rack/lock.rb:
11:in `call'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
106:in `call'
/usr/local/src/passenger/lib/phusion_passenger/rack/
request_handler.rb:91:in `process_request'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_request_handler.rb:206:in `main_loop'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:376:in `start_request_handler'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:334:in `handle_spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/utils.rb:182:in
`safe_fork'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:332:in `handle_spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:351:in `__send__'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:351:in `main_loop'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:195:in `start_synchronously'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:162:in `start'
/usr/local/src/passenger/lib/phusion_passenger/railz/
application_spawner.rb:213:in `start'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
261:in `spawn_rails_application'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server_collection.rb:126:in `lookup_or_add'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
255:in `spawn_rails_application'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server_collection.rb:80:in `synchronize'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server_collection.rb:79:in `synchronize'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
254:in `spawn_rails_application'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
153:in `spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/spawn_manager.rb:
286:in `handle_spawn_application'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:351:in `__send__'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:351:in `main_loop'
/usr/local/src/passenger/lib/phusion_passenger/
abstract_server.rb:195:in `start_synchronously'
/usr/local/src/passenger/bin/passenger-spawn-server:61



Johan Sørensen

unread,
Jun 18, 2009, 4:11:39 AM6/18/09
to gito...@googlegroups.com
Hi Trevor,

On Thu, Jun 18, 2009 at 10:02 AM, Trevor<tre...@fea.st> wrote:
> Getting "We're sorry, but something went wrong." when browsing
> individual commits. I thought at first this was related to our other
> issue where events were not persisted to the DB but now that is fixed
> we still see this error (below).

Are you getting this on all the commits? And it's not related to
events, since whenever you view a single commit it's read directly
from the git repository

> Does anyone know what causes this?
>

> A ActionView::TemplateError occurred in commits#show:
>
>  undefined method `[]' for nil:NilClass
>  On line #36 of app/views/commits/show.html.erb
>
>    33:     <p><%= t("views.commits.message").call(self, tree_path
> (@commit.id)) %></p>
>    34:   <% else -%>
>    35:     <% unless @commit.merge? -%>
>    36:       <%= render_diff_stats(@commit.stats) -%>
>    37:       <%= render_diffmode_selector -%>
>    38:       <% @diffs.each do |file| -%>
>    39:         <a name="<%= h(force_utf8(file.a_path)) -%>"></a>
>
>    vendor/grit/lib/grit/commit.rb:186:in `stats'
>    app/views/commits/show.html.erb:36

Looks like an issue with the stats parsing code in Grit, that
particular line is:
stats = @repo.commit_stats(self.sha, 1)[0][-1]
so it's probably returning an empty array for some reason. Could you
run the following git command in the repository:
git show --num-stat e43b2a5339196e8d510893178ab806bf22f6f7b5
and paste the results (feel free to edit filenames, commit
msgs+authors etc, just let the numbers be). I'm thinking that
particular commit prints the numstats in a format confusing grit (or
not printing them at all)

Thanks
Johan

Trevor

unread,
Jun 22, 2009, 7:41:52 PM6/22/09
to Gitorious
This happens with nearly all commits.

grit wasn't installed, I installed the gem but it didn't help, I still
see:

-sh-3.2$ git show --num-stat e43b2a5339196e8d510893178ab806bf22f6f7b5
fatal: unrecognized argument: --num-stat

Am I missing something something obvious here?

Cheers,
Trevor

Johan Sørensen

unread,
Jun 23, 2009, 2:42:18 AM6/23/09
to gito...@googlegroups.com
On Tue, Jun 23, 2009 at 1:41 AM, Trevor<tre...@fea.st> wrote:
>
> This happens with nearly all commits.
>
> grit wasn't installed, I installed the gem but it didn't help, I still
> see:

Grit is bundled with the app in vendor/ (we have some bug and
performance fixes in there)

>
> -sh-3.2$ git show --num-stat e43b2a5339196e8d510893178ab806bf22f6f7b5
> fatal: unrecognized argument: --num-stat
>
> Am I missing something something obvious here?

I think you might be running an old version of git itself? (git --version)

>
> Cheers,
> Trevor

JS

Trevor

unread,
Jun 23, 2009, 3:54:46 PM6/23/09
to Gitorious
It was git version 1.6.3.2.198.g6096d
It is now git version 1.6.3.3.334.g916e1

But still get:

-sh-3.2$ pwd
/home/git/repositories/f10/2e6/6e46300317f63a02bb1bc68e480835ef3b.git
-sh-3.2$ git show --num-stat b756d7a09ed88471f2c350bb53b6ef97f26d608c
fatal: unrecognized argument: --num-stat


I don't see --num-stat documented anywhere?

Cheers,
Trevor

Trevor

unread,
Jun 23, 2009, 4:22:56 PM6/23/09
to Gitorious
Ok got it, thanks for you patience.

Trevor

-sh-3.2$ git show --numstat e43b2a5339196e8d510893178ab806bf22f6f7b5
commit e43b2a5339196e8d510893178ab806bf22f6f7b5
Author: Author <aut...@company.com>
Date: Wed Jun 17 09:32:03 2009 +0100

Comment

3 0 .gitignore
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
7 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
20 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
25 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
8 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
20 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
25 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
20 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
25 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
18 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
20 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
13 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Trevor

unread,
Jul 6, 2009, 7:20:26 PM7/6/09
to Gitorious
Hi, we are still seeing this for nearly every commit. Does anyone know
what causes this?

Thank you,
Trevor
> > On Jun 22, 11:42═pm, Johan SЬrensen <jo...@johansorensen.com> wrote:
>
> > > On Tue, Jun 23, 2009 at 1:41 AM, Trevor<tre...@fea.st> wrote:
>
> > > > This happens with nearly all commits.
>
> > > > grit wasn't installed, I installed the gem but it didn't help, I still
> > > > see:
>
> > > Grit is bundled with the app in vendor/ (we have some bug and
> > > performance fixes in there)
>
> > > > -sh-3.2$ git show --num-stat e43b2a5339196e8d510893178ab806bf22f6f7b5
> > > > fatal: unrecognized argument: --num-stat
>
> > > > Am I missing something something obvious here?
>
> > > I think you might be running an old version of git itself? (git --version)
>
> > > > Cheers,
> > > > Trevor
>
> > > JS
>

Trevor

unread,
Jul 24, 2009, 11:54:52 PM7/24/09
to Gitorious
bump :)
Reply all
Reply to author
Forward
0 new messages