You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/lib/ruby/1.8/git/lib.rb:148:in process_commit_data': undefined method<<' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/1.8/git/lib.rb:135:in each' from /usr/lib/ruby/1.8/git/lib.rb:135:inprocess_commit_data'
from /usr/lib/ruby/1.8/git/lib.rb:123:in commit_data' from /usr/lib/ruby/1.8/git/object.rb:230:incheck_commit'
from /usr/lib/ruby/1.8/git/object.rb:197:in committer' from /usr/lib/ruby/1.8/git/object.rb:202:incommitter_date'
from /home/djdeath/bin/confront_patch_list.rb:32
from /home/djdeath/bin/confront_patch_list.rb:27:in `each_key'
from /home/djdeath/bin/confront_patch_list.rb:27
It happens when I call the committer_date method with something like this :
repo = Git::Base.open("#{ENV['PWD']}")
ob = Git::Object::Commit.new(repo, "whatevercommithash")
puts ob.committer_date
The problem is in the process_commit_data method in lib.rb because this method expects the commit's metadatas to be separated from the commit's comment by an empty line. But it does not expect the commit to contain a empty line too.
Here is what the commit triggering this crash looks like :
Here is the stack :
/usr/lib/ruby/1.8/git/lib.rb:148:in
process_commit_data': undefined method
<<' for nil:NilClass (NoMethodError)from /usr/lib/ruby/1.8/git/lib.rb:135:in
each' from /usr/lib/ruby/1.8/git/lib.rb:135:in
process_commit_data'from /usr/lib/ruby/1.8/git/lib.rb:123:in
commit_data' from /usr/lib/ruby/1.8/git/object.rb:230:in
check_commit'from /usr/lib/ruby/1.8/git/object.rb:197:in
committer' from /usr/lib/ruby/1.8/git/object.rb:202:in
committer_date'from /home/djdeath/bin/confront_patch_list.rb:32
from /home/djdeath/bin/confront_patch_list.rb:27:in `each_key'
from /home/djdeath/bin/confront_patch_list.rb:27
It happens when I call the committer_date method with something like this :
repo = Git::Base.open("#{ENV['PWD']}")
ob = Git::Object::Commit.new(repo, "whatevercommithash")
puts ob.committer_date
The problem is in the process_commit_data method in lib.rb because this method expects the commit's metadatas to be separated from the commit's comment by an empty line. But it does not expect the commit to contain a empty line too.
Here is what the commit triggering this crash looks like :
$ git cat-file commit a693b0cdba94f60f7ed43754d2c34151cdd11da5
tree 99cbf46748dfa4f35acc1d63ae51817f3e17ec9d
parent 484ab62c5ee805c2bdc405a85a4e64da2722690f
author Mauro Carvalho Chehab mchehab@redhat.com 1228161854 -0200
committer Mauro Carvalho Chehab mchehab@redhat.com 1228161854 -0200
em28xx: remove backward compat macro added on a previous fix
commit 50f3beb50abe0cc0228363af804e50e710b3e5b0 fixed em28xx-alsa
locking schema. However, a backport macro was kept.
This patch removes the macro, since it is not needed for the module
compilation against upstream.
Signed-off-by: Mauro Carvalho Chehab mchehab@redhat.com
So the fix is pretty easy, on lib.rb line 137 you have :
Replace it by :
Regards,
Lionel Landwerlin
The text was updated successfully, but these errors were encountered: