therubymug / hitch

Git author attribution helper for pair programmers.
http://github.com/therubymug/hitch
MIT License
249 stars 31 forks source link

Garbled email address #16

Closed ngpestelos closed 11 years ago

ngpestelos commented 11 years ago

Hi,

We've been using hitch for a while now and recently we noticed that the email address displayed is garbled text.

Here's a sample .hitchrc file.

therubymug commented 11 years ago

What version of Hitch are you on?

ngpestelos commented 11 years ago

v1.0.1

therubymug commented 11 years ago

I left a comment on the gist. I have not seen this behavior before. Do you a way for me to reproduce this locally? Otherwise, replacing the group_email line with something like: :group_email: dev@yourdevteamemail.org should do the trick.

ngpestelos commented 11 years ago

My first attempt was to delete .hitchrc and .hitch_pairs but got the same problem. Next, I followed your advice and it worked.

Although I could not reproduce the problem at this time, I'll let you know if this happens again.

Thank you!

therubymug commented 11 years ago

Sounds good. I'll close this, but let me know if you run into more issues.

ZachBeta commented 11 years ago

Ran into the same problem on a fresh machine with a new dev. Once we replaced the line in that file it worked. Could possibly be something in newer versions on initial file creation, haven't had time to investigate deeper though cc @jmkiss @benjaminoakes

henrik commented 11 years ago

I also got this just now. Fresh install of v1.0.1. It seems to get increasingly garbled, too. After a few test commits, hitch now gives me:

Henrik Nyh and Foo Bar <Vm0xd1IxbFhSWGRPVldoVlYwZG9WRmxVU205V1ZteHpXa2M1YWxadGVEQlpN
M0JIVkcxS1NHVklhRlpOClYyaHlXVlJHV21Rd01WVldiR1JwQ2xKcldYcFdW
VnBHVDFaQ1VsQlVNRDA9+henrik+foo@Vm0xd1IxbFhSWGRPVldoVlYwZG9WRmxVU205V1ZteHpXa2M1YWxadGVEQlpN
M0JIVkcxS1NHVklhRlpOClYyaHlXVlJHV21Rd01WVldiR1JwQ2xKcldYcFdW
VnBHVDFaQ1VsQlVNRDA9>
henrik commented 11 years ago

And my .hitchrc says:

:group_email: !ruby/string:HighLine::String |-
  Vm0xd1IxbFhSWGRPVldoVlYwZG9WRmxVU205V1ZteHpXa2M1YWxadGVEQlpN
  M0JIVkcxS1NHVklhRlpOClYyaHlXVlJHV21Rd01WVldiR1JwQ2xKcldYcFdW
  VnBHVDFaQ1VsQlVNRDA9
henrik commented 11 years ago

After fixing the email in my hitchrc, hitch gives the right output but after making a commit I still get a mess:

 Author: Henrik Nyh and Foo Bar <Vm1wR1lXRXdOVWhVV0doVFlUSm9WVmxzWkc5alZteDBZM3BHVG1KSGVIaFZNV2hyWVRGWmQwMVVWbGRpClJrWXpWVVpGT1ZCUlBUMD0=+henrik+foo@Vm1wR1lXRXdOVWhVV0doVFlUSm9WVmxzWkc5alZteDBZM3BHVG1KSGVIaFZNV2hyWVRGWmQwMVVWbGRpClJrWXpWVVpGT1ZCUlBUMD0=>

Not sure if that's just garbled or some intentional escaping.

therubymug commented 11 years ago

@henrik it seems their's something weird going on when HighLine first acquires the group_email string. A quick fix for your situation would be to manually set the group_email, like so: :group_email: dev@yourdevteamemail.org

Although, I would like to know how I can reproduce this elusive heisenbug!

ZachBeta commented 11 years ago

Looks like there should be a conversion of the HighLine::String into a string before yaml. Haven't been able to identify where this happens in the code yet...

2.0.0p247 :001 > "adfa".to_yaml
NoMethodError: undefined method `to_yaml' for "adfa":String
    from (irb):1
    from /Users/zach/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in `<main>'
2.0.0p247 :002 > require 'yaml'
 => true
2.0.0p247 :003 > "adfa".to_yaml
 => "--- adfa\n...\n"
2.0.0p247 :004 > require 'highline'
 => true
2.0.0p247 :005 > HighLine::String.new("asdf")
 => "asdf"
2.0.0p247 :006 > HighLine::String.new("asdf").to_yaml
 => "--- !ruby/string:HighLine::String |-\n  YXNkZg==\n"
2.0.0p247 :007 > HighLine::String.new("asdf").to_s
 => "asdf"
2.0.0p247 :008 > HighLine::String.new("asdf").to_s.to_yaml
 => "--- asdf\n...\n"
therubymug commented 11 years ago

@ZachBeta this was fixed on 1.0.3 :-) Just now.

henrik commented 11 years ago

I think you mean 1.0.2, judging by the commit history. Thanks!

benjaminoakes commented 10 years ago

Good to hear, thanks for fixing!

therubymug commented 10 years ago

@henrik ha! Yes, 1.0.2. :-)

@benjaminoakes yeah, it was a fix submitted by @iamvery