Skip to content

Fix Git::Lib#commit_data for GPG-signed commits #610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 2, 2023
Merged
Prev Previous commit
Next Next commit
Remove #process_tag_data indent parameter
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
commit 392cdf55c53fddf05c45af2d5f1bbf10d6a2c16b
6 changes: 3 additions & 3 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
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