Skip to content

Commit f990f8b

Browse files
author
TJ Biddle
committed
edge case was causing an error where it would fail out when getting the commit message.
1 parent a0afc0e commit f990f8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/git/lib.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ def process_commit_data(data, sha = nil, indent = 4)
144144
value = data.join(' ')
145145
if key == 'commit'
146146
sha = value
147-
hsh_array << hsh if hsh
147+
if hsh_array
148+
hsh_array << hsh if hsh
149+
end
148150
hsh = {'sha' => sha, 'message' => '', 'parent' => []}
149151
end
150152
if key == 'parent'

0 commit comments

Comments
 (0)