rondevera / twig

Your personal Git branch assistant.
http://rondevera.github.io/twig/
MIT License
270 stars 16 forks source link

Throws an Exception When a Git Config Property Has No Value #13

Closed WattsInABox closed 11 years ago

WattsInABox commented 11 years ago

I have a config parameter in my git setup that does not currently have a value: "difftool.sourcetree.path=". I can easily work around this issue, but it causes twig to throw an exception:

/Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/lib/twig/branch.rb:15:inblock in all_properties': undefined method []' for nil:NilClass (NoMethodError) from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/lib/twig/branch.rb:13:inmap' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/lib/twig/branch.rb:13:in all_properties' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/lib/twig/display.rb:56:inbranch_list_headers' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/lib/twig.rb:91:in list_branches' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/lib/twig/cli.rb:172:inread_cli_args!' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/gems/twig-1.0.0/bin/twig:10:in <top (required)>' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/bin/twig:19:inload' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@global/bin/twig:19:in <main>' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@portal/bin/ruby_noexec_wrapper:14:ineval' from /Users/williamrwatson/.rvm/gems/ruby-1.9.3-p194@portal/bin/ruby_noexec_wrapper:14:in <main>'

It looks like this MAY be fixed in the newest commits, we'd just need a release of the gem to rubygems.

rondevera commented 11 years ago

Thanks, this was indeed fixed in #1. I'm putting in a few more small bug fixes before releasing v1.0.1.

WattsInABox commented 11 years ago

Thanks @rondevera !