History

Merge pull request #2438 from mystor/push-wvvuuwmrwlul

Sebastian Thiel committed 8 months ago

Commit e441fa92 parents 93f39fb e63d4872 files · +19 −13Browse files

Unified · Split

2 files
  1. gix-diff/src/tree/function.rs +16 −10
  2. gix-pack/tests/pack/data/output/count_and_entries.rs +3 −3
gix-diff/src/tree/function.rs+16−10
@@ -300,9 +300,14 @@ fn handle_lhs_and_rhs_with_equal_filenames( · 299 unmodified lines
300) -> Result<(), Error> {300) -> Result<(), Error> {
301 match (lhs.mode.is_tree(), rhs.mode.is_tree()) {301 match (lhs.mode.is_tree(), rhs.mode.is_tree()) {
302 (true, true) => {302 (true, true) => {
303 delegate.push_back_tracked_path_component(lhs.filename);303 if lhs.oid == rhs.oid {
304 if lhs.oid != rhs.oid304 // If the tree oids are identical, we won't bother recursing
305 && delegate305 // into this subtree as the entire tree is identical.
306 // For path management purposes, treat it like a skipped blob.
307 delegate.push_path_component(lhs.filename);
308 } else {
309 delegate.push_back_tracked_path_component(lhs.filename);
310 if delegate
306 .visit(Change::Modification {311 .visit(Change::Modification {
307 previous_entry_mode: lhs.mode,312 previous_entry_mode: lhs.mode,
308 previous_oid: lhs.oid.to_owned(),313 previous_oid: lhs.oid.to_owned(),
@@ -310,14 +315,15 @@ fn handle_lhs_and_rhs_with_equal_filenames( · 1 unmodified line
310 oid: rhs.oid.to_owned(),315 oid: rhs.oid.to_owned(),
311 })316 })
312 .is_break()317 .is_break()
313 {318 {
314 return Err(Error::Cancelled);319 return Err(Error::Cancelled);
320 }
321 queue.push_back((
322 Some(lhs.oid.to_owned()),
323 Some(rhs.oid.to_owned()),
324 relation_to_propagate,
325 ));
315 }326 }
316 queue.push_back((
317 Some(lhs.oid.to_owned()),
318 Some(rhs.oid.to_owned()),
319 relation_to_propagate,
320 ));
321 }327 }
322 (_, true) => {328 (_, true) => {
323 delegate.push_back_tracked_path_component(lhs.filename);329 delegate.push_back_tracked_path_component(lhs.filename);
gix-pack/tests/pack/data/output/count_and_entries.rs+3−3
@@ -146,7 +146,7 @@ fn traversals() -> crate::Result { · 145 unmodified lines
146 output::count::objects::Outcome {146 output::count::objects::Outcome {
147 input_objects: 1,147 input_objects: 1,
148 expanded_objects: 102,148 expanded_objects: 102,
149 decoded_objects: 18,149 decoded_objects: 10,
150 total_objects: 103,150 total_objects: 103,
151 },151 },
152 output::entry::iter_from_counts::Outcome {152 output::entry::iter_from_counts::Outcome {
@@ -179,7 +179,7 @@ fn traversals() -> crate::Result { · 26 unmodified lines
179 output::count::objects::Outcome {179 output::count::objects::Outcome {
180 input_objects: 1,180 input_objects: 1,
181 expanded_objects: 102,181 expanded_objects: 102,
182 decoded_objects: 18,182 decoded_objects: 10,
183 total_objects: 103,183 total_objects: 103,
184 },184 },
185 output::entry::iter_from_counts::Outcome {185 output::entry::iter_from_counts::Outcome {
@@ -221,7 +221,7 @@ fn traversals() -> crate::Result { · 35 unmodified lines
221 output::count::objects::Outcome {221 output::count::objects::Outcome {
222 input_objects: 16,222 input_objects: 16,
223 expanded_objects: 866,223 expanded_objects: 866,
224 decoded_objects: 208,224 decoded_objects: 74,
225 total_objects: 868,225 total_objects: 868,
226 },226 },
227 output::entry::iter_from_counts::Outcome {227 output::entry::iter_from_counts::Outcome {