Show More
@@ -4,6 +4,7 b' use crate::Revision;' | |||||
4 | use crate::NULL_REVISION; |
|
4 | use crate::NULL_REVISION; | |
5 |
|
5 | |||
6 | use im_rc::ordmap::DiffItem; |
|
6 | use im_rc::ordmap::DiffItem; | |
|
7 | use im_rc::ordmap::Entry; | |||
7 | use im_rc::ordmap::OrdMap; |
|
8 | use im_rc::ordmap::OrdMap; | |
8 |
|
9 | |||
9 | use std::cmp::Ordering; |
|
10 | use std::cmp::Ordering; | |
@@ -510,11 +511,20 b' fn add_from_changes(' | |||||
510 | // record this information as we will need it to take |
|
511 | // record this information as we will need it to take | |
511 | // the right decision when merging conflicting copy |
|
512 | // the right decision when merging conflicting copy | |
512 | // information. See merge_copies_dict for details. |
|
513 | // information. See merge_copies_dict for details. | |
|
514 | match copies.entry(dest) { | |||
|
515 | Entry::Vacant(slot) => { | |||
513 | let ttpc = TimeStampedPathCopy { |
|
516 | let ttpc = TimeStampedPathCopy { | |
514 | rev: current_rev, |
|
517 | rev: current_rev, | |
515 | path: entry, |
|
518 | path: entry, | |
516 | }; |
|
519 | }; | |
517 |
|
|
520 | slot.insert(ttpc); | |
|
521 | } | |||
|
522 | Entry::Occupied(mut slot) => { | |||
|
523 | let mut ttpc = slot.get_mut(); | |||
|
524 | ttpc.rev = current_rev; | |||
|
525 | ttpc.path = entry; | |||
|
526 | } | |||
|
527 | } | |||
518 | } |
|
528 | } | |
519 | Action::Removed(deleted_path) => { |
|
529 | Action::Removed(deleted_path) => { | |
520 | // We must drop copy information for removed file. |
|
530 | // We must drop copy information for removed file. |
General Comments 0
You need to be logged in to leave comments.
Login now