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

/usr/lib/ruby/vendor_ruby/grit/commit.rb:152:in list_from_string': undefined method split' for nil:NilClass (NoMethodError) #8

Open
drt24 opened this issue Sep 16, 2014 · 2 comments

Comments

@drt24
Copy link

drt24 commented Sep 16, 2014

When executing on this git repository: https://android.googlesource.com/kernel/goldfish.git

$ ./git-graph.rb /local/scratch/drt24/android/clones/kernel/goldfish

I get lots of lines like:

unknown header '' in commit de9c9f86be0dc3495de98dc65c80abe6e7c7d643
unknown header '' in commit de9c9f86be0dc3495de98dc65c80abe6e7c7d643
unknown header '' in commit de9c9f86be0dc3495de98dc65c80abe6e7c7d643
unknown header '' in commit de9c9f86be0dc3495de98dc65c80abe6e7c7d643
unknown header '' in commit de9c9f86be0dc3495de98dc65c80abe6e7c7d643
unknown header 'mergetag' in commit ce6fbaf160628df62ec953c701d5fc547484257a

And then:

/usr/lib/ruby/vendor_ruby/grit/commit.rb:152:in `list_from_string': undefined method `split' for nil:NilClass (NoMethodError)
    from /usr/lib/ruby/vendor_ruby/grit/commit.rb:125:in `find_all'
    from /usr/lib/ruby/vendor_ruby/grit/commit.rb:93:in `lazy_source'
    from /usr/lib/ruby/vendor_ruby/grit/lazy.rb:31:in `block (2 levels) in lazy_reader'
    from ./git-graph.rb:22:in `find_children'
    from ./git-graph.rb:301:in `block in <main>'
    from ./git-graph.rb:299:in `each'
    from ./git-graph.rb:299:in `<main>'

I am running Ubuntu 14.04.1 LTS 3.13.0-35-generic x86_64 with ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux], ruby-fast-xs 0.8.0-3build1 and ruby-grit 2.5.0-1.

@jerith666
Copy link
Owner

As with issue #7, this may be unfixable without porting to a different underlying git library. I'll at least see if I can reproduce it, though.

@jerith666
Copy link
Owner

I get a slightly different error:

/usr/local/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/commit.rb:152:in `list_from_string': can't convert nil into String (TypeError)
from /usr/local/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/commit.rb:125:in `find_all'
from /usr/local/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/commit.rb:93:in `lazy_source'
from /usr/local/lib/ruby/gems/1.9.1/gems/grit-2.5.0/lib/grit/lazy.rb:31:in `block (2 levels) in lazy_reader'
from ../graphing.github/git-graph.rb:22:in `find_children'
from ../graphing.github/git-graph.rb:301:in `block in <main>'
from ../graphing.github/git-graph.rb:299:in `each'
from ../graphing.github/git-graph.rb:299:in `<main>'

My guess is that we're running into grit not knowing about a new mergetag commit header field described here.

There's some chance that https://github.com/gitlabhq/grit already contains a fix for this. If not, they may be open to implementing such a fix. Could you try out their fork of grit and see if it works?

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

2 participants