Skip to content

Commit 1601672

Browse files
Sathishkumar NatesanPeter Degen-Portnoy
authored andcommitted
OTWO-2996 Rename parse_commit_date to parse_date as it can be used to parse author/committer date
1 parent 36381a6 commit 1601672

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/scm/parsers/git_styled_parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def self.internal_parse(io, opts)
4343
e.author_name = $1
4444
elsif line =~ /^Date: (.*)$/
4545
# MUST be RFC2822 format to parse properly, else defaults to epoch time
46-
e.author_date = parse_commit_date($1)
46+
e.author_date = parse_date($1)
4747
elsif line == "__BEGIN_COMMENT__"
4848
state = :message
4949
elsif line =~ /^AuthorEmail: (.+)$/
@@ -81,7 +81,7 @@ def self.internal_parse(io, opts)
8181
yield e if e
8282
end
8383

84-
def self.parse_commit_date(date)
84+
def self.parse_date(date)
8585
t = Time.rfc2822(date) rescue Time.at(0)
8686
t.utc
8787
end

0 commit comments

Comments
 (0)