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

Commit 183f930

Browse files
committed
allow empty emails
1 parent d8121f7 commit 183f930

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/grit/actor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def initialize(name, email)
1717
# Returns Git::Actor.
1818
def self.from_string(str)
1919
case str
20-
when /<.+>/
21-
m, name, email = *str.match(/(.*) <(.+?)>/)
20+
when /<.*>/
21+
m, name, email = *str.match(/(.*) <(.*?)>/)
2222
return self.new(name, email)
2323
else
2424
return self.new(str, nil)

lib/grit/git-ruby/git_object.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def initialize(str)
2828
m = /^(.*?) <(.*)> (\d+) ([+-])0*(\d+?)$/.match(str)
2929
if !m
3030
case str
31-
when /<.+>/
32-
m, @name, @email = *str.match(/(.*) <(.+?)>/)
31+
when /<.*>/
32+
m, @name, @email = *str.match(/(.*) <(.*?)>/)
3333
else
3434
@name = str
3535
end

0 commit comments

Comments
 (0)