Remove unnecessary conversion from integer to hex

parent e46cd8b5
...@@ -37,15 +37,17 @@ module Gitlab ...@@ -37,15 +37,17 @@ module Gitlab
if status&.zero? if status&.zero?
refs = output.split("\n") refs = output.split("\n")
refs.inject(nil) do |checksum, ref| result = refs.inject(nil) do |checksum, ref|
value = Digest::SHA1.hexdigest(ref) value = Digest::SHA1.hexdigest(ref).hex
if checksum.nil? if checksum.nil?
value value
else else
(checksum.hex ^ value.hex).to_s(16) checksum ^ value
end end
end end
result.to_s(16)
else else
# Empty repositories return with a non-zero status and an empty output. # Empty repositories return with a non-zero status and an empty output.
if output&.empty? if output&.empty?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment