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 17, 2023
1 parent 7924fc9 commit 392cdf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/git/lib.rb
Expand Up @@ -261,17 +261,17 @@ def each_cat_file_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 }

each_cat_file_header(data) do |key, value|
hsh[key] = value
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 392cdf5

Please sign in to comment.