Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Commit

Permalink
allow empty emails
Browse files Browse the repository at this point in the history
  • Loading branch information
simonzack committed Jan 27, 2015
1 parent d8121f7 commit b4851f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/grit/actor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def initialize(name, email)
# Returns Git::Actor.
def self.from_string(str)
case str
when /<.+>/
m, name, email = *str.match(/(.*) <(.+?)>/)
when /<.*>/
m, name, email = *str.match(/(.*) <(.*?)>/)
return self.new(name, email)
else
return self.new(str, nil)
Expand Down
2 changes: 1 addition & 1 deletion lib/grit/git-ruby/git_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(str)
if !m
case str
when /<.+>/
m, @name, @email = *str.match(/(.*) <(.+?)>/)
m, @name, @email = *str.match(/(.*) <(.*?)>/)
else
@name = str
end
Expand Down

0 comments on commit b4851f8

Please sign in to comment.