Skip to content

Commit

Permalink
Remove #process_tag_data indent parameter
Browse files Browse the repository at this point in the history
As with the previous commits, this indent parameter appears to be a
relic of old usage; the #process_tag_data method has a single caller
that explicitly sets the indent to zero, so the indent parameter and
associated handling can just be removed.

Signed-off-by: Simon Coffey <simon.coffey@futurelearn.com>
  • Loading branch information
Simon Coffey committed Jan 16, 2023
1 parent d4a9026 commit 2767684
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/git/lib.rb
Expand Up @@ -262,10 +262,10 @@ def each_commit_header(data)
def tag_data(name)
sha = sha.to_s
tdata = command_lines('cat-file', 'tag', name)
process_tag_data(tdata, name, 0)
process_tag_data(tdata, name)
end

def process_tag_data(data, name, indent=4)
def process_tag_data(data, name)
hsh = {
'name' => name,
'message' => ''
Expand All @@ -279,7 +279,7 @@ def process_tag_data(data, name, indent=4)
hsh[key] = value.join(' ')
end

hsh['message'] = data.collect {|line| line[indent..-1]}.join("\n") + "\n"
hsh['message'] = data.join("\n") + "\n"

return hsh
end
Expand Down

0 comments on commit 2767684

Please sign in to comment.