We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d3d4e commit 05117d4Copy full SHA for 05117d4
lib/git/lib.rb
@@ -122,10 +122,10 @@ def object_size(sha)
122
def commit_data(sha)
123
sha = sha.to_s
124
cdata = command_lines('cat-file', ['commit', sha])
125
- process_commit_data(cdata, sha)
+ process_commit_data(cdata, sha, 0)
126
end
127
128
- def process_commit_data(data, sha = nil)
+ def process_commit_data(data, sha = nil, indent = 4)
129
in_message = false
130
131
if sha
@@ -139,8 +139,7 @@ def process_commit_data(data, sha = nil)
139
if line == ''
140
in_message = !in_message
141
elsif in_message
142
- hsh['message'] << "\n" if hsh['message'] != ''
143
- hsh['message'] << line[4..-1]
+ hsh['message'] << line[indent..-1] << "\n"
144
else
145
data = line.split
146
key = data.shift
0 commit comments