lib/eternity/patch.rb in eternity-2.0.1 vs lib/eternity/patch.rb in eternity-3.0.0
- old
+ new
@@ -46,12 +46,12 @@
def calculate_delta
base_commit.with_index do |base_index|
current_commit.with_index do |current_index|
- current_delta = Delta.merge current_history.reverse.map(&:delta), base_index
- target_delta = Delta.merge target_history.reverse.map(&:delta), base_index
+ current_delta = Delta.merge current_history.reverse.map(&:delta)
+ target_delta = Delta.merge target_history.reverse.map(&:delta)
revert_delta = Delta.revert current_delta, base_index
merged_delta = merge_deltas target_delta, revert_delta, base_index
merged_delta.each_with_object({}) do |(collection, elements), hash|
@@ -91,10 +91,10 @@
return {} if merged?
super
end
def merge_deltas(target_delta, revert_delta, base_index)
- remaining_delta = Delta.merge remaining_history.reverse.map(&:delta), base_index
+ remaining_delta = Delta.merge remaining_history.reverse.map(&:delta)
Delta.merge [revert_delta, target_delta, remaining_delta], base_index
end
end